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

Legend problem. Options · View
ccoroom
#1 Posted : Wednesday, June 30, 2010 1:54:45 PM
Rank: Member

Groups: Registered

Joined: 3/15/2010
Posts: 10
Hi,

When I add a legend to the chart with more than two series. It works.
But, when I add a legend that has only one series, it draw all of single point and its value for the legend.

I have solved this problem by adding transparent dummy series. I post this issue for your information. I'm using aichart 1.5.

Code:
        // adding a dummy series
        ChartSeries dummy = new ChartSeries(" ", ChartTypes.CandleStick);
        dummy.setBackColor(Color.TRANSPARENT);
        addSeries(dummy);


Code:
// adding a lenged
ChartLegend legend = new ChartLegend();
        legend.setDock(ChartLayoutElement.Dock.Top);
        legend.setAlignment(ChartLayoutElement.Alignment.Near);
        legend.getTextPaint().setAntiAlias(true);
        legend.getTextPaint().setColor(Color.WHITE);

        mChartView.getLegends().add(legend);


Regards,
Sung Ahn Kim.
Baydalka Volodymyr
#2 Posted : Wednesday, June 30, 2010 3:00:56 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Please, use next code to change legend items generation behavior.

Code:
legend.setItemsProvider(new LegendItemsProvider.SeriesItemsProvider());


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-2016 ArtfulBits. All rights reserved.