1. To avoid shrinking of the pie in the case where you legend occupies more space you should set a preferred width for the legend container. This can be achieved by setting TKChartLegendConainer's preferredSize
property. Please consider the code snippet below:
_chart.legend.container.preferredSize = CGSizeMake(100, 200);
2. To show the y axis line in TKChart
you should set the hidden
property of TKChartAxisStyle
to NO like in the following code snippet:
_chart.yAxis.style.lineHidden = NO;
Please note that this property should be set after you add a series to the chart or you explicitly set the yAxis
property. Otherwise the y axis would not exist at this moment.
You can increase or decrease the thickness of the line by setting appropriate stroke to the series:
series.style.stroke = [TKStroke strokeWithColor:[UIColor redColor] width:3.0];
To make change the thickness of the horizontal grid lines you should set the stroke width of the horizontalStroke and horizontalAlternateStroke properties of TKChartGridStyle:
_chart.gridStyle.horizontalLineStroke.width = 3;
_chart.gridStyle.horizontalLineAlternateStroke.width = 3;
3. To create a chart with several series like in the screenshot you should simply create the series with the corresponding data and add it to the chart. Please consider the code snippet:
TKChartLineSeries *lineSeries = [[TKChartLineSeries alloc] initWithItems:lineData];
TKChartColumnSeries *columnSeries = [[TKChartColumnSeries alloc] initWithItems:columnData];
TKChartColumnSeries *secondColumndSeries = [[TKChartColumnSeries alloc] initWithItems:secondColumnData];
I hope this helps. Should you have further questions do not hesitate to contact us.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items