-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
All Charts Icons Support [Dub #629, #624] #1261
Conversation
Great work! Could you please squash the commits to compact :) if you can't, just leave it be, and Daniel will review it. One thing to say that is, due to Daniel is working on 3.0 version, this could take longer time, as 3.0 has major changes.. Not sure the impact to this one |
…a property and dataset allows. Demos updated accordingly.
@liuxuan30 thanks! squashed. Yes, all effects of #624 and #629 can be achieved using this branch. Will wait and hope there will not be too many conflicts with 3.0 release. Btw, will version 3.0 be written on Swift3? |
@AnatolyRosencrantz thanks for the effort. |
BTW, do you consider include some unit tests, it's nice to have the coverage. If you don't have time that's fine - |
@liuxuan30 nope. Should I update BarChartTests and LineChartTests or something more complex? |
@AnatolyRosencrantz it's great that you could add the tests for icons, just have one sample for each chart type to test is enough? Take your time, it's nice to have but not forcing |
@liuxuan30 updated existing BarChartTests and LineChartTests |
@AnatolyRosencrantz great work! Thanks so much. Travis good:) |
Is there a way to add different icons for each bar? |
@michaeljules yes, icon is being set per-DataEntry (bar in BarChart or point in LineChart), in it's data property. This property is optional, so if no UIImage will be included or some other object will be found there — icon for that exact DataEntry will just not be drawn. |
@AnatolyRosencrantz just FYI, Daniel wants to release v3 first and review and merge this after v3 |
Can this be merged now with the release of 3.0? |
Pull Request for Swift3 — #1793 |
@abjurato Is it possible to show icons only for highlight values? Also automatic change base on user change highlight values. |
Can it support gif ? Really love this feature |
Finally, implemented Icons (Nodal Image) feature for all charts.
I've chosen to store image in data parameter of ChartDataEntry to allow icons to be specified per-value (example of use: to sign personal records in running application). Dataset can specify if it will draw icons and customise offset from default placement. IconOffset is CGSize, but for radial Radar and Pie only height value matters — as distance from centre.
ChartBaseDataSet, IChartDataSet:
ChartUtils:
All xxxChartRenderers:
BarChartDataEntry:
Demos: included star image to project, for stacked bar, pie, scatter, radar, line, candle stick, bubble, bar and horizontal bar added Toggle Icon button and star to be drawn.