MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

怎样在柱状图当中显示多个markerview?

Open 0xByteLeon opened this issue 9 years ago • 10 comments

我需要对柱状图中的部分数据做一个标记显示出来,但是不知道怎样同事显示多个,貌似只能显示一个markerviwe?有人做过吗?怎么实现?

0xByteLeon avatar Jan 02 '17 13:01 0xByteLeon

https://github.com/PhilJay/MPAndroidChart/wiki/How-not-to-contribute

How NOT to contribute:

  • ...
  • Using a language other than English (preferred) or German (if necessary)
  • ...

patrick-elmquist avatar Jan 02 '17 14:01 patrick-elmquist

Hi , if you want to draw a custom marker view , you could override draw method

public class CustomMarkerView extends MarkerView {
...  
@Override
public void draw(Canvas canvas, float posx, float posy) {
/*your code*/
}
}

Also it's possible to plot multiple markers , you could use highlightValues method

public void highlightValues(Highlight[] highs)

For more details , see wiki

Maybe you don't want to draw highlight indicators , try this dataset.setDrawHighlightIndicators(false);

lynnzc avatar Jan 03 '17 07:01 lynnzc

哥们,超屌,我们中国人要顶起来

ghost avatar Jan 05 '17 09:01 ghost

多个markView可能要自定义了。对点击事件重写一下

ghost avatar Jan 05 '17 09:01 ghost

@xiaolongonly 菜鸡不会~

0xByteLeon avatar Jan 16 '17 07:01 0xByteLeon

菜鸡不会~菜鸡不会~菜鸡不会~菜鸡不会~菜鸡不会~

ghost avatar May 17 '17 09:05 ghost

菜鸡不会菜鸡不会菜鸡不会菜鸡不会菜鸡不会~

yangyiRunning avatar May 17 '17 09:05 yangyiRunning

MDZZ ┑( ̄Д  ̄)┍ @Saloed123 @yangyiRunning

0xByteLeon avatar May 18 '17 08:05 0xByteLeon

。。。。。。

playscforever avatar Sep 04 '18 13:09 playscforever

继承Chart,定义多个MarkView属性,重写Chart的drawMarkers()方法。

hysheng avatar Jan 30 '19 09:01 hysheng