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
hagsaf  
#1 Posted : Sunday, February 3, 2013 4:27:02 PM(UTC)
hagsaf
Rank: Newbie

Groups: Registered
Joined: 2/3/2013(UTC)
Posts: 2
Location: hagsaf

Hello,

I want to draw a vertical progress bar with multiple colors. Therefor I use a StackBar with one stack.
Problem 1:
-if last element cs5.getPoints().addXY(0, 66); hast a big value I get an ungly gap between element and and of widget
-I tried to setRange(0, 100); but it had zero effect

What needs to be done with my code?

Thanks
Zoltan

Quote:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.mlay);


ChartView chartView = (ChartView) findViewById(R.id.chartViewF);



ChartPalette palette = new ChartPalette(0xff8B0000, 0xffFF0000, 0xffeeee22, 0xff112211, 0xffD3D3D3);
chartView.setPalette(palette);

ChartSeries cs1 = new ChartSeries("", ChartTypes.StackedBar);
ChartSeries cs2 = new ChartSeries("", ChartTypes.StackedBar);
ChartSeries cs3 = new ChartSeries("", ChartTypes.StackedBar);
ChartSeries cs4 = new ChartSeries("", ChartTypes.StackedBar);
ChartSeries cs5 = new ChartSeries("", ChartTypes.StackedBar);


cs1.getPoints().addXY(0, 1);
cs2.getPoints().addXY(0, 2);
cs3.getPoints().addXY(0, 3);
cs4.getPoints().addXY(0, 4);
cs5.getPoints().addXY(0, 66);

chartView.getSeries().add(cs1);
chartView.getSeries().add(cs2);
chartView.getSeries().add(cs3);
chartView.getSeries().add(cs4);
chartView.getSeries().add(cs5);

ChartArea area = new ChartArea();
area.getDefaultXAxis().setVisible(false);
area.getDefaultYAxis().setVisible(false);
area.getDefaultXAxis().getScale().setRange(0, 100);
chartView.getAreas().add(area);
}
Quote:

hagsaf  
#2 Posted : Thursday, February 7, 2013 1:29:20 AM(UTC)
hagsaf
Rank: Newbie

Groups: Registered
Joined: 2/3/2013(UTC)
Posts: 2
Location: hagsaf

hello do you have answer?
Baydalka Volodymyr  
#3 Posted : Thursday, February 7, 2013 8:00:02 PM(UTC)
Baydalka Volodymyr
Rank: Member

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

Hi,

Try to set area.getDefaultXAxis().getScale().setMargin(0);

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.