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

reload Options · View
reload
#1 Posted : Thursday, December 09, 2010 3:16:31 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Hello.

I have a problem with xAxis labels.
when I add 2 charts , set xAxisLabel for the 1st chart & set point.setAxisLabel(""); for 2nd I got all range blank.
As the result I got all blank too.

who can I add 2 charts and draw xValues only for 1st Series ??


//second chart add
ChartSeries series2 = new ChartSeries(name, ChartTypes.Line);
series2.setBackColor(new Integer(color));
chart.getSeries().add(series2);

//axis init
area.getDefaultXAxis().setValueType(ChartAxis.TYPE_NUMBER)
area.getDefaultXAxis().setLabelsMode(ChartAxis.MODE_SERIES_LABELS);


//add points for chart
ChartPoint point = new ChartPoint(x, y);
point.setAxisLabel("");
cpCollection.add(point);

Thanks.
Baydalka Volodymyr
#2 Posted : Thursday, December 09, 2010 4:50:18 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Just try to duplicate labels for all points with the same X value. Current implementation use labels of last series. That means if both series contains point with the same X value, chart uses the label of second series.

Best regards,
Volodymyr Baydalka
Andriod development and support team
reload
#3 Posted : Tuesday, December 21, 2010 3:20:59 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Hello.

Is there any way to delete series from chart

like this:
chart.getSeries().remove(obj);

ChartNamedCollection do not have remove,or delete ?
only clear() is available.

Thanks.
Baydalka Volodymyr
#4 Posted : Tuesday, December 21, 2010 3:27:57 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Thank you for bug report, we will add remove() method with next release. Please use clear() method for now.

Best regards,
Volodymyr Baydalka
Andriod development and support team
reload
#5 Posted : Tuesday, December 21, 2010 5:13:59 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
can you tell approximate date of new version release ?
alexk
#6 Posted : Tuesday, December 21, 2010 5:14:39 PM
Rank: Administration


Groups: Registered

Joined: 7/28/2009
Posts: 55
Location: Ukraine, Lviv
Q1 2011
ArtfulBits Team
Product Director
reload
#7 Posted : Thursday, December 23, 2010 11:28:11 AM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Hello.
The problem is :
when I create ChartTypes.Bubble and add points

double x = offset + index;
double y = yAr[index];
double size[] = new double[]{y, ANY_NUMBER};

ChartPoint point = new ChartPoint(x, size);
point.setAxisLabel("");
cpCollection.add(point);


the size of point is the same all time!!!
used: ANY_NUMBER[0.01-1..30]
??
Baydalka Volodymyr
#8 Posted : Thursday, December 23, 2010 1:04:52 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Second value of ChartPoint is not absolute value of bubble size. There is formula that used to compute bubble size

Code:
bubbleSize = MIN_SIZE + (MAX_SIZE - MIN_SIZE) * secondY / maxSecondYs;


to set MIN_SIZE/MAX_SIZE value please use following code
Code:
series.setAttribute(ChartBubbleType.MIN_RADIUS, new Integer(10));
series.setAttribute(ChartBubbleType.MAX_RADIUS, new Integer(50));


Best regards,
Volodymyr Baydalka
Andriod development and support team
reload
#9 Posted : Thursday, December 23, 2010 3:34:52 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Thank you.
reload
#10 Posted : Monday, December 27, 2010 11:29:53 AM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Hello.

I have created chart and can't manage vertical lines.
I set number of lines like this:
axisScaleX.setDesiredIntervalCount(3);
axisScaleY.setDesiredIntervalCount(3);


ChartField chart = new ChartField();
chart.getChart().setPalette(new ChartPalette(ChartPalette.Rainbow.getValues()));
ChartArea area = new ChartArea();
chart.setBorder(BorderFactory.createRoundedBorder(new XYEdges(4, 4, 4, 4)));
chart.setSize(Display.getWidth() - 8, Display.getHeight() - 8);

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_SERIES_LABELS);

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

ChartAxis yAxis = area.getDefaultYAxis();
yAxis.setPosition(ChartAxis.POSITION_RIGHT);

return chart;

and the result is in picture.
reload attached the following image(s):
9630.png (6kb) downloaded 55 time(s).
Baydalka Volodymyr
#11 Posted : Monday, December 27, 2010 2:13:27 PM
Rank: Developers Team


Groups: Registered, Administrators

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

With ChartAxis.MODE_SERIES_LABELS aiCharts generates labels and lines for each series point and doesn't use desiredIntervalCount value. Try to use ChartAxis.MODE_RANGE_LABELS mode.

Best regards,
Volodymyr Baydalka
Andriod development and support team
reload
#12 Posted : Monday, December 27, 2010 3:24:35 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Thans it helped but:

ch2.setAxisLabel(label); not working now

and I just get net number on xAxis instead of my lable :(
Baydalka Volodymyr
#13 Posted : Monday, December 27, 2010 5:55:24 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Please check following sample. It demonstrates how to use date values.

Best regards,
File Attachment(s):
DateHiLoSample.zip (3kb) downloaded 4 time(s).
Volodymyr Baydalka
Andriod development and support team
reload
#14 Posted : Monday, December 27, 2010 5:57:31 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
hello.

I have tryed to reduce ChartArea boudns
XYRect sRect1 = ((ChartArea)chart.getAreas().get(0)).getSeriesBounds();

sRect1.width -= 200;
((ChartArea)chart.getAreas().get(0)).setBounds(sRect1);

but nothing heppened.
???

reload
#15 Posted : Monday, December 27, 2010 5:59:40 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Thanks.
reload
#16 Posted : Tuesday, December 28, 2010 11:23:10 AM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
>>Hi,
>>Please check following sample. It demonstrates how to use >>date values.

>>Best regards,
>>File Attachment(s):
>>DateHiLoSample.zip (3kb) downloaded 0 time(s).

If I add date this way I have 1 problem,
if my chart is friday - monday, I will have a gap in 2 days
(Forex chart). How can it be fixed. ?
Baydalka Volodymyr
#17 Posted : Tuesday, December 28, 2010 3:52:55 PM
Rank: Developers Team


Groups: Registered, Administrators

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

In this case, there is two different workarounds. Please check updated sample. Method sample1CustomLabels() implements first one and commented method sample2CustomFormat() implemented second one.

Best regards,
File Attachment(s):
DateHiLoSample.zip (3kb) downloaded 5 time(s).
Volodymyr Baydalka
Andriod development and support team
reload
#18 Posted : Wednesday, December 29, 2010 4:16:27 PM
Rank: Member

Groups: Registered

Joined: 10/5/2010
Posts: 20
Location: Minsk
Thanks, С новым годом!
Users browsing this topic
Guest
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.