Charts
Charts copied to clipboard
How to get all the Marker points in line graph with multiple lines.
I am implementing line chart with Multiple(Two) lines (Sales of current month and previous month on the day basis). On graph click we can pop up a view (BalloonMarker) which shows Graph Point. But there is a limitation. It shows only one line point. Is there way we can get points for both lines? And display round circles on selected points on both lines? I also need to customize BalloonMarker view.
I have attached current and expected layout image:
Current:-

Expected:

I don't think this is possible because you don't necessarily have the same X coordinate for both data sets. You're not using the same X range with two different Y values on the line graph.
However, something that would be nice is to identify in the marker which line graph the marker is referring to. I don't think this is currently possible. For example in my chart:

The BalloonMarker points to the green plot, but the label is just "Value" because I don't know which one it's pointing to. The IMarker interface func is as follows:
override func refreshContent(entry: ChartDataEntry, highlight: Highlight)
The "entry" parameter has x and y values but doesn't provide a way to know which line is currently being pointed to.
Spoke too soon. There's an additional "data" field that's an Any? in ChartDataEntry. When you create your data set you can set this to a string. Then in refreshContent() function:
let label = entry.data as! String
and label is the type of your Y value
it's possible
@kkieffer Thanks. It helps me.
I am able to display alert for both the points. Passing x value index as “data" field in Any? in ChartDataEntry.
I am using same x Range for both lines. I believe that currently graph is displaying line and give point to nearest y Value of any graph line. It would be great if it takes x value and display marker on both the graph point with that xValue.
Ex

How to show pop up arrow with custom XIB ?
I am implementing line chart with Multiple(Two) lines (Sales of current month and previous month on the day basis). On graph click we can pop up a view (BalloonMarker) which shows Graph Point. But there is a limitation. It shows only one line point. Is there way we can get points for both lines? And display round circles on selected points on both lines? I also need to customize BalloonMarker view.
I have attached current and expected layout image:
Current:-
![]()
Expected:
![]()
Have u figure out how to display round circles on selected points on both lines?
Has the problem been solved? I have the same problem
same problem
I am implementing line chart with Multiple(Two) lines (Sales of current month and previous month on the day basis). On graph click we can pop up a view (BalloonMarker) which shows Graph Point. But there is a limitation. It shows only one line point. Is there way we can get points for both lines? And display round circles on selected points on both lines? I also need to customize BalloonMarker view. I have attached current and expected layout image: Current:-
Expected:
Have u figure out how to display round circles on selected points on both lines?
Have you figured out how to outline circles?
@kkieffer can you send me your custom marker code please?
Have a look at this thread