2746

MPAndroid Line Chart single data point with curve

Question:

I want linechart as follows. I want to show only specified point (blue circled should be there) (red circled should not be there).

<a href="https://i.stack.imgur.com/qH2wM.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/qH2wM.png" data-original="https://i.stack.imgur.com/qH2wM.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Answer1:

I think of 2 methods.

First: disable all points and values with

lineDataSet.setDrawValues(dataSet.drawValues); lineDataSet.setDrawCircles(dataSet.drawValues);

Then add another LineDataSet to the LineChart only containing that one point for the Maximum. This solution causes an additional entry in the Legend.

The other solution would be a custom MarkerView like described <a href="https://stackoverflow.com/questions/38100511/how-can-i-draw-a-circle-on-highlight-point-in-line-chart" rel="nofollow">here</a>

Answer2:

To do that first of all set your point colors to transparent as:

dataset.setCircleColor(Color.TRANSPARENT); dataset.setCircleColorHole(Color.TRANSPARENT);

Then after that Highlight specific point as:

Highlight highlight = new Highlight(50f, 0); chart.highlightValue(highlight, false);

Insert your point instead of (50f,0). Never tried just think that we may do this in that way.Try this and do let me know if it works buddy :)

Recommend

  • what is the algorithm for an RBF kernel matrix in Matlab?
  • Recycler view item colour change repeating after scrolling
  • jquery change attribute
  • Strange behavior with uninitialized pointers [duplicate]
  • How does RabbitMQ supports large number of virtual connections from a single TCP connection?
  • How to render a full webpage in smaller iframe?
  • Why does GetAttr not work on cloudformation template parameters?
  • How to change type datatable column [duplicate]
  • How create observable with parameters in Angular 6?
  • Two view models ,one for the whole page & the other for a small area
  • Google Maps V3 (PHP/MYSQL with custome infobox)
  • Winston logger not write to file
  • Whatsapp Image sharing not working
  • How to print every 4th column up to nth column and from (n+1)th column to last using awk?
  • How to manipulate content of a comment with Apache POI
  • Vue.js 2: Vue cannot find files from /assets folder (v-for)
  • How to implement JQuery confirm dialog with JSF
  • Run git bash script in Windows 7/64bit
  • python socket.sendto
  • Tensorflow crash using tf.train.Saver() with GPU
  • How to get the Owner of the ContextMenu (from Silverlight 4 toolkit)?
  • Facebook friend list in Facebook Android SDK 3.14
  • Unable to run testNG tests from maven
  • JQuery Mobile Ajax Navigation in Single-Page Template
  • VBScript InputBox and Help Files
  • How to add html image in to velocity template file to send email?
  • How to merge objects within array based on attribute
  • concise way of flattening multiindex columns
  • 'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs