Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SeriesItem not starting at 0 #9

Closed
mzilian opened this issue Dec 4, 2015 · 3 comments
Closed

SeriesItem not starting at 0 #9

mzilian opened this issue Dec 4, 2015 · 3 comments

Comments

@mzilian
Copy link

mzilian commented Dec 4, 2015

Is it possible to add a SeriesItem that reaches for example from 25% to 50%, without having to overdraw the first 25%?

@bmarrdev
Copy link
Owner

bmarrdev commented Dec 4, 2015

When creating the series the setRange function lets you set the range as well as the initial position:

public Builder setRange(final float minValue, final float maxValue, final float initialValue)

In your case something like this should do the trick:

DecoView arcView = (DecoView)findViewById(R.id.dynamicArcView);
SeriesItem seriesItem1 = new SeriesItem.Builder(Color.RED).setRange(0, 100, 25).build();
int series1Index = arcView.addSeries(seriesItem1);
arcView.addEvent(new DecoEvent.Builder(50).setIndex(series1Index).setDelay(1000).build());

@bmarrdev bmarrdev closed this as completed Dec 4, 2015
@mzilian
Copy link
Author

mzilian commented Dec 7, 2015

But with this the red item starts at 0 and not at 25. I would like that there is only between 25 and 50 the red item.
Am I missing something?

@bmarrdev
Copy link
Owner

bmarrdev commented Dec 9, 2015

If you want the total range of the series to run from 25 to 50 use setRange(25, 50, 25).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants