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! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
reload  
#1 Posted : Friday, January 28, 2011 4:40:34 PM(UTC)
reload
Rank: Member

Groups: Registered
Joined: 10/5/2010(UTC)
Posts: 20
Location: Minsk

Hello.
Have problems with yAxis update,
Do update in separate thread than appear this (see attach), and than next second all is ok.????

Create chart
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);

/////////
update chart
ChartAxisScale yAxis = ((ChartArea) chart.getAreas().get(0)).getDefaultYAxis().getScale();
yAxis.setRange(lo, hi);

this appear only if chart update is performed in separate thread.
reload attached the following image(s):
9630_err.png (10kb) downloaded 32 time(s).
9630_norm.png (9kb) downloaded 31 time(s).

You cannot view/download attachments. Try to login or register.
Users browsing this topic
Guest
Similar Topics
How to set the YAXIS label width? (Android OS)
by ccoroom 4/14/2010 8:38:59 PM(UTC)
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-2017 ArtfulBits. All rights reserved.