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

Balloon Marker: making it work in line chart inside combined view #2703

Closed
egmonterrubio opened this issue Aug 11, 2017 · 1 comment
Closed

Comments

@egmonterrubio
Copy link

Hello; I'm learning to use Charts, it's an amazing tool, thanks for sharing it.

I created a CombinedChart with bars and lines, and it's working fine, then I added the BallonMarker and it works with the bar chart but it doesn't consider the line chart, I added the option to select if the user wants bar and line, just bar or just line charts, and with the option of just bars selected it still works, but I can't make it work with the line chart, is there something that need to be changed in the Balloon Marker code?

This is the code I use to create it:

let marker:BalloonMarker = BalloonMarker(color: UIColor.red, font: UIFont(name: "Helvetica", size: 12)!, textColor: UIColor.white, insets: UIEdgeInsets(top: 7.0, left: 7.0, bottom: 7.0, right: 7.0))
        marker.minimumSize = CGSize(width: 75.0, height: 35.0)
        combinedChartView.marker = marker

Also, one more thing, is it possible to make the BallonMarker change position if there is not enough space to be shown, like this case?

captura de pantalla 2017-08-11 a la s 11 20 42

Thanks!!

@liuxuan30
Copy link
Member

Balloon marker is just a demo marker. You can create your own marker class and do whatever you like to display and where.

For bar/line chart issue, you may want to take a look at #2692

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