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

addEdgeDetail works correctly only for 0.5f values, when setShowPointWhenEmpty(false) is not set #22

Closed
target33 opened this issue Jun 12, 2016 · 3 comments
Assignees

Comments

@target33
Copy link

If you use addEdgeDetail() with a value different from 0.5f (for example 0.2f), it works fine only if setShowPointWhenEmpty(false) is set. Otherwise it keeps on drawing edge detail with 0.5f value.

This works correctly:

      SeriesItem seriesItem1 = new SeriesItem.Builder(Color.argb(255, 64, 196, 0))
              .setRange(0, 100, 0)
              .setInitialVisibility(false)
              .setLineWidth(32f)
              .addEdgeDetail(new EdgeDetail(EdgeDetail.EdgeType.EDGE_OUTER, Color.parseColor("#22000000"), 0.2f))
              .setShowPointWhenEmpty(false)
              .build();

This draws a edge detail of 0.5f, instead of 0.2f:

      SeriesItem seriesItem1 = new SeriesItem.Builder(Color.argb(255, 64, 196, 0))
              .setRange(0, 100, 0)
              .setInitialVisibility(false)
              .setLineWidth(32f)
              .addEdgeDetail(new EdgeDetail(EdgeDetail.EdgeType.EDGE_OUTER, Color.parseColor("#22000000"), 0.2f))
              .build();
@bmarrdev
Copy link
Owner

After some trial and error I was able to reproduce this issue. It only occurs when executing EventType.EVENT_SHOW on the DecoView in addition to the conditions mentioned. I will try to allocate some time to resolve this issue next weekend.

@bmarrdev bmarrdev self-assigned this Jun 26, 2016
bmarrdev added a commit that referenced this issue Jul 3, 2016
…tem object to get the width instead of Paint object. Github issue #22
@bmarrdev
Copy link
Owner

bmarrdev commented Jul 3, 2016

This is resolved in v1.2. Update your gradle file with the dependency:

compile 'com.github.bmarrdev:android-DecoView-charting:v1.2'

@bmarrdev bmarrdev closed this as completed Jul 3, 2016
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

3 participants
@target33 @bmarrdev and others