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

Getting Legend name always returns 'null' Options · View
sleytus
#1 Posted : Tuesday, October 16, 2012 9:28:07 AM
Rank: Newbie

Groups: Registered

Joined: 10/9/2012
Posts: 5
Hello,

We are trying to create multiple legends. We want to be able to control when a series' legend is shown or hidden. However, we are having trouble setting/getting a legend's name. In the code snippet below, strLegendName is always 'null'. What are we doing wrong?

Thanks

Code:
// Create a custom legend that we'll later assign to each series...
ChartLegend legend = new ChartLegend();
legend.setLayoutMode(ChartLegend.LayoutMode.Horizontal);
legend.setAdapter(new ChartLegendAdapter.SeriesItemsAdapter());
legend.setName("custom-legend");
m_oChartView.getLegends().add(legend);

// Sanity check...
for (int i = 0; i < m_oChartView.getLegends().size(); i++)
{
    String strLegendName = m_oChartView.getLegends().get(i).getName();
    Log.d("LegendName: ",strLegendName);
}

[/size]
sleytus
#2 Posted : Tuesday, October 16, 2012 1:16:31 PM
Rank: Newbie

Groups: Registered

Joined: 10/9/2012
Posts: 5
Hello,

Upon further investigation it seems that multiple legends and binding a legend to a series is broken. If you call series.setLegend("mylegend"), where "mylegend" is a legend that was previously created and added to the chart, then the legend never shows. Even if "mylegend" is specified as a legend in an XML file, it still doesn't work. Calling series.setLegend() using *any* string always results in a hidden legend. Could you please suggest a work-around?

Thanks
Baydalka Volodymyr
#3 Posted : Tuesday, October 16, 2012 1:20:14 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Thank you for bug-report. We try to upload fix tomorrow.

Best regards,
Volodymyr Baydalka
Andriod development and support team
Baydalka Volodymyr
#4 Posted : Tuesday, October 16, 2012 3:12:11 PM
Rank: Developers Team


Groups: Registered, Administrators

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

OK, we have fixed this bug. You may download new version : http://www.artfulbits.co...droid/try/aicharts.aspx

Best regards
Volodymyr Baydalka
Andriod development and support team
sleytus
#5 Posted : Friday, October 26, 2012 10:51:05 AM
Rank: Newbie

Groups: Registered

Joined: 10/9/2012
Posts: 5
Hello,

The fix works great! Thanks very much for your quick response.
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.