I have created a CPTTradingRangePlot using the up-to-date sample code as an example. The sample uses a starting reference date and an index to draw the y-axis labels. The Y-axis calculates on calendar days and I can’t find a way to change this. The problem is the data is missing weekends and holidays and thus the y-axis becomes out of sync. Is it possible to account for this?
I have created a CPTTradingRangePlot using the up-to-date sample code as an example. The
Share
Your datasource should convert the date range into a continuous range by dropping out the days you don’t want. For instance, days 1 to 5 might map to indexes 0-4, followed by days 8-12 mapping to 5-9. Days 6 and 7 are ignored (e.g., a weekend). For labels, you can either make custom labels that match up with the correct points, or make a custom
NSNumberFormatterthat reverses the range conversion and formats the label correctly.