Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Show values in column bar graph
posted

Hello,

I would like to show the actual values in a column bar chart. Inside or outside the bar.

As in this example:

Does anybody know whether that is possible with IGChart?

With kind regards,

Jos Jong

  • 26458
    Verified Answer
    Offline posted

    Hi,

    Yes, it's certainly possible by using custom series markers.

    The chart exposes a delegate method called -chartView:viewForMarkerInSeries, where you can return a UITextView with the column's value.

    I've attached a sample project for you. Note, that I'm using options.offsetY property to offset the marker vertically. Depending on the version of your chart framework you may or may not have that property available. It was added in the last service release (possible a couple of service releases ago). Alternatively, you can place the text view in another UIView to vertically offset the text.

    ColumnChartTextMarkers.zip