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
spradeesh  
#1 Posted : Friday, October 22, 2010 3:32:04 PM(UTC)
spradeesh
Rank: Member

Groups: Registered
Joined: 9/24/2010(UTC)
Posts: 11
Location: Chennai

Team

How to add the legend in the column chart.

Thanks in advance

spradeesh  
#2 Posted : Friday, October 22, 2010 3:47:11 PM(UTC)
spradeesh
Rank: Member

Groups: Registered
Joined: 9/24/2010(UTC)
Posts: 11
Location: Chennai

ChartArea chartArea = new ChartArea();
ChartSeries chartSeries1 = new ChartSeries();
ChartSeries chartSeries2 = new ChartSeries();
ChartSeries chartSeries3 = new ChartSeries();
ChartSeries chartSeries4 = new ChartSeries();

chartSeries1.setType(ChartTypes.Column);
chartSeries2.setType(ChartTypes.Column);
chartSeries3.setType(ChartTypes.Column);
chartSeries4.setType(ChartTypes.Column);

chartSeries1.setLegend("Jan");
chartSeries2.setLegend("Feb");
chartSeries3.setLegend("Mar");
chartSeries4.setLegend("Apr");


----

I have the above code. but legend is not getting displayed

Baydalka Volodymyr  
#3 Posted : Friday, October 22, 2010 6:19:46 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

Hi,

You need to add legend first. Please check following code.


Code:
ChartArea chartArea = new ChartArea();
ChartLehend chartLegend = new ChartLegend();
ChartSeries chartSeries1 = new ChartSeries();
ChartSeries chartSeries2 = new ChartSeries();
ChartSeries chartSeries3 = new ChartSeries();
ChartSeries chartSeries4 = new ChartSeries();

chartSeries1.setType(ChartTypes.Column);
chartSeries2.setType(ChartTypes.Column);
chartSeries3.setType(ChartTypes.Column);
chartSeries4.setType(ChartTypes.Column);

// ...

chartView.getAreas().add(chartArea );
chartView.getLegends().add(chartLegend);
chartView.getSeries().add(chartSeries1);
chartView.getSeries().add(chartSeries3);
chartView.getSeries().add(chartSeries3);
chartView.getSeries().add(chartSeries4);


Best regards,
Volodymyr Baydalka
Andriod development and support team
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-2017 ArtfulBits. All rights reserved.