Charts: Custom highlighter/marker

Created on 1 Aug 2017  路  1Comment  路  Source: danielgindi/Charts

Hello

I need to create a linechart with specific design.
screen shot 2017-08-01 at 18 15 53
screen shot 2017-08-01 at 18 15 33

I was able to fix the design for the axis, etc but I'm having trouble on how to achieve the custom highlighter/marker.

Requirements

  • the highlighted value should have a circle on the value
  • the highlighted value should have a line from the value to the bottom
  • when changing the highlighted value, the top half of the highlighter should have a dashed line + a marker on the top of the view indicating it's value.

Any help is welcome!

Kind regards

Most helpful comment

refer

public protocol IMarker: NSObjectProtocol

Write your own marker. You can take a look at how BalloonMarker is implemented.

For the dashed line, one option is override drawHighlightLines() only enable the vertical highlight line and make it dashed above your line. You may need to add more parameters to know the marker position, you should feel comfortable to change the source code if needed

>All comments

refer

public protocol IMarker: NSObjectProtocol

Write your own marker. You can take a look at how BalloonMarker is implemented.

For the dashed line, one option is override drawHighlightLines() only enable the vertical highlight line and make it dashed above your line. You may need to add more parameters to know the marker position, you should feel comfortable to change the source code if needed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anhltse03448 picture anhltse03448  路  3Comments

PrashantKT picture PrashantKT  路  3Comments

Shunshine07 picture Shunshine07  路  3Comments

coop44483 picture coop44483  路  3Comments

kirti0525 picture kirti0525  路  3Comments