Closed mzilian closed 8 years ago
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());
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?
If you want the total range of the series to run from 25 to 50 use setRange(25, 50, 25)
.
Is it possible to add a SeriesItem that reaches for example from 25% to 50%, without having to overdraw the first 25%?