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

BalloonMarker - display X data #808

Closed
AndreaScavuzzo opened this issue Mar 7, 2016 · 1 comment
Closed

BalloonMarker - display X data #808

AndreaScavuzzo opened this issue Mar 7, 2016 · 1 comment

Comments

@AndreaScavuzzo
Copy link

hello,

about the ballon marker, is there the possibility to display also the X data? When I tap on the graph, I need to display not only the value, but also the corresponding X value.

in the file: BalloonMarker.swift
I have tried to modify the label from "value" to "xIndex", but I will see the index and not the dataX(index)

public override func refreshContent(entry entry: ChartDataEntry, highlight: ChartHighlight)
{
   // let label = entry.value.description
    let label = entry.xIndex.description

compliments for this good library to create the graph, it is the most beautiful for iPhone!

thanks,
Andrea

@liuxuan30
Copy link
Member

You could subclass the marker and pass through a x value array, so you can get the value, since you already know the xIndex
data entry object does not have x value right now

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

2 participants