From c81db32c6a466230d64a6e2112a47a12f044e66c Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Tue, 19 Dec 2017 11:26:49 +0200 Subject: [PATCH 1/2] Use example drawEntryLabelsEnabled instead of removed drawSliceTextEnabled --- ChartsDemo/Objective-C/Demos/HalfPieChartViewController.m | 2 +- ChartsDemo/Objective-C/Demos/PieChartViewController.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChartsDemo/Objective-C/Demos/HalfPieChartViewController.m b/ChartsDemo/Objective-C/Demos/HalfPieChartViewController.m index cb8ef98bb4..80be2872a1 100644 --- a/ChartsDemo/Objective-C/Demos/HalfPieChartViewController.m +++ b/ChartsDemo/Objective-C/Demos/HalfPieChartViewController.m @@ -128,7 +128,7 @@ - (void)optionTapped:(NSString *)key { if ([key isEqualToString:@"toggleXValues"]) { - _chartView.drawSliceTextEnabled = !_chartView.isDrawSliceTextEnabled; + _chartView.drawEntryLabelsEnabled = !_chartView.drawEntryLabelsEnabled; [_chartView setNeedsDisplay]; return; diff --git a/ChartsDemo/Objective-C/Demos/PieChartViewController.m b/ChartsDemo/Objective-C/Demos/PieChartViewController.m index 0799e4640e..dd9b0228bd 100644 --- a/ChartsDemo/Objective-C/Demos/PieChartViewController.m +++ b/ChartsDemo/Objective-C/Demos/PieChartViewController.m @@ -135,7 +135,7 @@ - (void)optionTapped:(NSString *)key { if ([key isEqualToString:@"toggleXValues"]) { - _chartView.drawSliceTextEnabled = !_chartView.isDrawSliceTextEnabled; + _chartView.drawEntryLabelsEnabled = !_chartView.drawEntryLabelsEnabled; [_chartView setNeedsDisplay]; return; From 0fa1287a4b6997396c628d5eb98a8cfcd260875a Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Tue, 19 Dec 2017 11:27:55 +0200 Subject: [PATCH 2/2] Use in example ILineChartDataSet.mode property instead of removed drawSteppedEnabled one --- ChartsDemo/Objective-C/Demos/LineChart1ViewController.m | 9 ++++++++- ChartsDemo/Objective-C/Demos/LineChart2ViewController.m | 9 ++++++++- .../Objective-C/Demos/LineChartTimeViewController.m | 9 ++++++++- .../Objective-C/Demos/MultipleLinesChartViewController.m | 9 ++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/ChartsDemo/Objective-C/Demos/LineChart1ViewController.m b/ChartsDemo/Objective-C/Demos/LineChart1ViewController.m index 15fd13a2ac..8cf348c759 100644 --- a/ChartsDemo/Objective-C/Demos/LineChart1ViewController.m +++ b/ChartsDemo/Objective-C/Demos/LineChart1ViewController.m @@ -227,7 +227,14 @@ - (void)optionTapped:(NSString *)key { for (id set in _chartView.data.dataSets) { - set.drawSteppedEnabled = !set.isDrawSteppedEnabled; + switch (set.mode) { + case LineChartModeLinear: + case LineChartModeCubicBezier: + case LineChartModeHorizontalBezier: + set.mode = LineChartModeStepped; + break; + case LineChartModeStepped: set.mode = LineChartModeLinear; + } } [_chartView setNeedsDisplay]; diff --git a/ChartsDemo/Objective-C/Demos/LineChart2ViewController.m b/ChartsDemo/Objective-C/Demos/LineChart2ViewController.m index d1996ba77e..990ba151c5 100644 --- a/ChartsDemo/Objective-C/Demos/LineChart2ViewController.m +++ b/ChartsDemo/Objective-C/Demos/LineChart2ViewController.m @@ -239,7 +239,14 @@ - (void)optionTapped:(NSString *)key { for (id set in _chartView.data.dataSets) { - set.drawSteppedEnabled = !set.isDrawSteppedEnabled; + switch (set.mode) { + case LineChartModeLinear: + case LineChartModeCubicBezier: + case LineChartModeHorizontalBezier: + set.mode = LineChartModeStepped; + break; + case LineChartModeStepped: set.mode = LineChartModeLinear; + } } [_chartView setNeedsDisplay]; diff --git a/ChartsDemo/Objective-C/Demos/LineChartTimeViewController.m b/ChartsDemo/Objective-C/Demos/LineChartTimeViewController.m index 12667ea96f..07bf61c50d 100644 --- a/ChartsDemo/Objective-C/Demos/LineChartTimeViewController.m +++ b/ChartsDemo/Objective-C/Demos/LineChartTimeViewController.m @@ -193,7 +193,14 @@ - (void)optionTapped:(NSString *)key { for (id set in _chartView.data.dataSets) { - set.drawSteppedEnabled = !set.isDrawSteppedEnabled; + switch (set.mode) { + case LineChartModeLinear: + case LineChartModeCubicBezier: + case LineChartModeHorizontalBezier: + set.mode = LineChartModeStepped; + break; + case LineChartModeStepped: set.mode = LineChartModeLinear; + } } [_chartView setNeedsDisplay]; diff --git a/ChartsDemo/Objective-C/Demos/MultipleLinesChartViewController.m b/ChartsDemo/Objective-C/Demos/MultipleLinesChartViewController.m index dcb18cd7df..01f284f014 100644 --- a/ChartsDemo/Objective-C/Demos/MultipleLinesChartViewController.m +++ b/ChartsDemo/Objective-C/Demos/MultipleLinesChartViewController.m @@ -165,7 +165,14 @@ - (void)optionTapped:(NSString *)key { for (id set in _chartView.data.dataSets) { - set.drawSteppedEnabled = !set.isDrawSteppedEnabled; + switch (set.mode) { + case LineChartModeLinear: + case LineChartModeCubicBezier: + case LineChartModeHorizontalBezier: + set.mode = LineChartModeStepped; + break; + case LineChartModeStepped: set.mode = LineChartModeLinear; + } } [_chartView setNeedsDisplay];