whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

Chart Blinking Options · View
reload
#1 Posted : Wednesday, January 26, 2011 2:26:43 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Hello.
I have troubles with chart blinking, it appear after I do :

pointsCollection.beginUpdate();
chartPoint.setY( new double[]
{ bar.lo, bar.hi, bar.open, bar.close }) ;
pointsCollection.endUpdate();

The image is not a screen shoot, but it looks like this. Just for 200 millis. :(
reload attached the following image(s):
9630.png (8kb) downloaded 34 time(s).
Baydalka Volodymyr
#2 Posted : Wednesday, January 26, 2011 3:36:13 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Unfortunately there is no enough information to reproduce this bug. Could you provide settings of series, axes and area that you set?

Best regards,
Volodymyr Baydalka
Andriod development and support team
reload
#3 Posted : Wednesday, January 26, 2011 3:42:58 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
ChartFieldExtension chart = new ChartFieldExtension();
chart.getChart().setPalette(new ChartPalette(ChartPalette.Rainbow.getValues()));
ChartArea area = new ChartArea();
chart.setBorder(BorderFactory.createRoundedBorder(new XYEdges(4, 4, 4, 4)));
chart.setSize(w, h);

ChartOptions ch = Core.app.chartOptions;
ChartUtils.setChartTitle(ch.getPair()+" "+ch.getChartInterval(), chart);

ChartSeries series1 = new ChartSeries("Series 1", Core.app.chartOptions.getChartType());
chart.getAreas().add(area);
chart.getSeries().add(series1);
series1.setArea(area.getName());
series1.setLabelFormat("%YVALUE%");

// if candleStick
series1.setAttribute(ChartCandleStickType.PRICE_UP_COLOR, new Integer(Color.RED));
series1.setAttribute(ChartCandleStickType.PRICE_DOWN_COLOR, new Integer(Color.GREEN));

area.getDefaultXAxis().setValueType(ChartAxis.TYPE_NUMBER);
area.getDefaultXAxis().setLabelsMode(ChartAxis.MODE_NO_LABELS);

ChartAxisScale axisScaleX = area.getDefaultXAxis().getScale();
ChartAxisScale axisScaleY = area.getDefaultYAxis().getScale();
axisScaleX.setInverted(true);
axisScaleX.setDesiredIntervalCount(6);
axisScaleY.setDesiredIntervalCount(6);


ChartAxis yAxis = area.getDefaultYAxis();
yAxis.setPosition(ChartAxis.POSITION_RIGHT);
yAxis.setFormat(format);
reload
#4 Posted : Wednesday, January 26, 2011 3:45:03 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
I update chart in a separate thread.
Baydalka Volodymyr
#5 Posted : Friday, January 28, 2011 5:10:59 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Unfortunately, aiCharts is not thread safely. Try to do all your operation with ChartField in UI thread. Example :

Code:
public void run()
{
  while (isRun)
  {
    // Compute chart data

    synchronized (UiApplication.getEventLock()) // Lock UI for update.
    {
      //update chart
    }
  }
}


Best regards,
Volodymyr Baydalka
Andriod development and support team
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.