Вопрос

Area Chart

I am developing an Area chart like the following and facing the following issue.

  • curve shape is not looking proper, i need a smooth curve.

  • X-axis values are Dynamic, it May start with 40 or May be 60 or any other value.how to calculate that ?

Any Help will be greatly Appreciated.

Это было полезно?

Решение

To make the line smoother, either give it more data points or make a curved plot.

plot.interpolation = CPTScatterPlotInterpolationCurved;

If you know the range of data values, just set the xRange directly. Remember to set the location to the min value and the length to (max - min). You can also have the graph scale the plot space for you.

[plotSpace scaleToFitPlots:[graph allPlots]];
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top