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

How to draw circle at the end of a data set on line chart #2270

Closed
shivang2902 opened this issue Mar 22, 2017 · 3 comments
Closed

How to draw circle at the end of a data set on line chart #2270

shivang2902 opened this issue Mar 22, 2017 · 3 comments

Comments

@shivang2902
Copy link

screen shot 2017-03-21 at 5 56 43 pm
@thierryH91200 , @danielgindi , @liuxuan30, @petester42, @AlBirdie
The situation is that i need to show the data of 4 hours [3 hours past, 1 hour future], suppose the current time is 11 so the line graph will be plotted from 9 - 11, but 11 -12 will have no line graph, for now i am giving 0 value for data ahead of 11 which makes the graph drop on xAxis. As i saw the MPAndroidChart can accepts separate values for x and y axis which makes this scenario possible.
let data: LineChartData = LineChartData(xVals: months, dataSets: dataSets)
The above function has been removed from latest version of the library or it could have solved my purpose. Now at the end of the line or dataset i have to show a circle also

P.S : i am using iOS Swift 3.0

@thierryH91200
Copy link
Contributor

you can use scatter chart on the last point

@shivang2902
Copy link
Author

@thierryH91200 can you please be more specific, how can i change the Chart to another type ?, there is method to draw circle on x,y interaction but can i customise it to show only one circle ?

@liuxuan30
Copy link
Member

liuxuan30 commented Mar 27, 2017

How to draw circle at the end of a data set on line chart

just take a look at drawCircles() and override drawDataSets to draw the last data.

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

3 participants