[Swift] iOS-Charts Tutorial: Highlight Selected Value With a Custom Marker
Enrich your chart and emphasise the important information
In my recent article [Swift] Set Up a Basic Bar Chart Using iOS-Charts, I demonstrate how to set up a basic bar chart using a widely-used third-party library iOS-Charts.
Today we are going to take it to the next level. By adding some simple pieces of code, we can make the user catch the important information on your chart at once.
Since this article focuses on how to add a custom marker to the iOS Chart, I assume you already the prerequisite knowledge of building an iOS Chart and creating a custom view from xib. I will skip chart view and data setup in the following explanation. If you would like to know more about how I set up this bar chart, please see [Swift] Setting Up a Basic Bar Chart Using iOS-Charts.
Based on the bar chart I made in the last article, I will show you how to add a custom marker that appears when a value is selected.