diff --git a/Charts/Charts.xcodeproj/project.pbxproj b/Charts/Charts.xcodeproj/project.pbxproj index e9ecd2aa46..01c745bee4 100644 --- a/Charts/Charts.xcodeproj/project.pbxproj +++ b/Charts/Charts.xcodeproj/project.pbxproj @@ -82,6 +82,8 @@ 5B6A54DE1AA74516000F57C2 /* RadarChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54C91AA74516000F57C2 /* RadarChartDataSet.swift */; }; 5B6A54DF1AA74516000F57C2 /* ScatterChartData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54CA1AA74516000F57C2 /* ScatterChartData.swift */; }; 5B6A54E01AA74516000F57C2 /* ScatterChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54CB1AA74516000F57C2 /* ScatterChartDataSet.swift */; }; + 5B8FE2AF1B68F8F600910C9E /* LineScatterCandleChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B8FE2AE1B68F8F600910C9E /* LineScatterCandleChartDataSet.swift */; }; + 5B8FE2B11B68FFF900910C9E /* LineScatterCandleRadarChartRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B8FE2B01B68FFF900910C9E /* LineScatterCandleRadarChartRenderer.swift */; }; 5BA8EC7D1A9D151C00CE82E1 /* ChartViewBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC671A9D151C00CE82E1 /* ChartViewBase.swift */; }; 5BA8EC881A9D151C00CE82E1 /* ChartDataApproximatorFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC751A9D151C00CE82E1 /* ChartDataApproximatorFilter.swift */; }; 5BA8EC891A9D151C00CE82E1 /* ChartDataBaseFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC761A9D151C00CE82E1 /* ChartDataBaseFilter.swift */; }; @@ -159,6 +161,8 @@ 5B6A54C91AA74516000F57C2 /* RadarChartDataSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadarChartDataSet.swift; sourceTree = ""; }; 5B6A54CA1AA74516000F57C2 /* ScatterChartData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScatterChartData.swift; sourceTree = ""; }; 5B6A54CB1AA74516000F57C2 /* ScatterChartDataSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScatterChartDataSet.swift; sourceTree = ""; }; + 5B8FE2AE1B68F8F600910C9E /* LineScatterCandleChartDataSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineScatterCandleChartDataSet.swift; sourceTree = ""; }; + 5B8FE2B01B68FFF900910C9E /* LineScatterCandleRadarChartRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineScatterCandleRadarChartRenderer.swift; sourceTree = ""; }; 5BA8EC401A9D14DC00CE82E1 /* Charts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Charts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5BA8EC441A9D14DC00CE82E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5BA8EC671A9D151C00CE82E1 /* ChartViewBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartViewBase.swift; sourceTree = ""; }; @@ -229,6 +233,7 @@ 5B6A548E1AA66A7A000F57C2 /* HorizontalBarChartRenderer.swift */, 5B6A548C1AA66A60000F57C2 /* ChartLegendRenderer.swift */, 5B6A548A1AA66A3D000F57C2 /* LineChartRenderer.swift */, + 5B8FE2B01B68FFF900910C9E /* LineScatterCandleRadarChartRenderer.swift */, 5B6A54881AA66A1A000F57C2 /* PieChartRenderer.swift */, 5B6A54861AA669F4000F57C2 /* RadarChartRenderer.swift */, 5B6A546F1AA5DB34000F57C2 /* ChartRendererBase.swift */, @@ -340,6 +345,7 @@ 5B6A54C31AA74516000F57C2 /* LineChartData.swift */, 5B6A54C41AA74516000F57C2 /* LineChartDataSet.swift */, 5B6A54C51AA74516000F57C2 /* LineRadarChartDataSet.swift */, + 5B8FE2AE1B68F8F600910C9E /* LineScatterCandleChartDataSet.swift */, 5B6A54C61AA74516000F57C2 /* PieChartData.swift */, 5B6A54C71AA74516000F57C2 /* PieChartDataSet.swift */, 5B6A54C81AA74516000F57C2 /* RadarChartData.swift */, @@ -454,6 +460,7 @@ 5B680D1F1A9D17C30026A057 /* ChartAxisBase.swift in Sources */, 5B4BCD3E1AA9C0A60063F019 /* ChartFillFormatter.swift in Sources */, 5B6A54DE1AA74516000F57C2 /* RadarChartDataSet.swift in Sources */, + 5B8FE2AF1B68F8F600910C9E /* LineScatterCandleChartDataSet.swift in Sources */, 5B680D211A9D17C30026A057 /* ChartLimitLine.swift in Sources */, 5B6A54DB1AA74516000F57C2 /* PieChartData.swift in Sources */, 5B6A54D91AA74516000F57C2 /* LineChartDataSet.swift in Sources */, @@ -505,6 +512,7 @@ 55E356581ADC63CD00A57971 /* BubbleChartDataEntry.swift in Sources */, 5B6A54911AA66A8D000F57C2 /* ChartDataRendererBase.swift in Sources */, 5BD8F06D1AB897D500566E05 /* ChartViewPortHandler.swift in Sources */, + 5B8FE2B11B68FFF900910C9E /* LineScatterCandleRadarChartRenderer.swift in Sources */, 5B6A54D51AA74516000F57C2 /* ChartData.swift in Sources */, 5B6A54971AA66AD2000F57C2 /* BarChartRenderer.swift in Sources */, 5B6A546B1AA5C23F000F57C2 /* ChartMarker.swift in Sources */, diff --git a/Charts/Classes/Data/BarLineScatterCandleChartDataSet.swift b/Charts/Classes/Data/BarLineScatterCandleChartDataSet.swift index 33eee1048a..0b321a237b 100644 --- a/Charts/Classes/Data/BarLineScatterCandleChartDataSet.swift +++ b/Charts/Classes/Data/BarLineScatterCandleChartDataSet.swift @@ -17,7 +17,7 @@ import UIKit public class BarLineScatterCandleChartDataSet: ChartDataSet { public var highlightColor = UIColor(red: 255.0/255.0, green: 187.0/255.0, blue: 115.0/255.0, alpha: 1.0) - public var highlightLineWidth = CGFloat(1.0) + public var highlightLineWidth = CGFloat(0.5) public var highlightLineDashPhase = CGFloat(0.0) public var highlightLineDashLengths: [CGFloat]? diff --git a/Charts/Classes/Data/CandleChartDataSet.swift b/Charts/Classes/Data/CandleChartDataSet.swift index 92e733a987..c09bde2bdd 100644 --- a/Charts/Classes/Data/CandleChartDataSet.swift +++ b/Charts/Classes/Data/CandleChartDataSet.swift @@ -15,7 +15,7 @@ import Foundation import CoreGraphics import UIKit -public class CandleChartDataSet: BarLineScatterCandleChartDataSet +public class CandleChartDataSet: LineScatterCandleChartDataSet { /// the width of the candle-shadow-line in pixels. /// :default: 3.0 diff --git a/Charts/Classes/Data/LineRadarChartDataSet.swift b/Charts/Classes/Data/LineRadarChartDataSet.swift index 04b569d6b0..a1f21cbfdb 100644 --- a/Charts/Classes/Data/LineRadarChartDataSet.swift +++ b/Charts/Classes/Data/LineRadarChartDataSet.swift @@ -15,7 +15,7 @@ import Foundation import CoreGraphics import UIKit -public class LineRadarChartDataSet: BarLineScatterCandleChartDataSet +public class LineRadarChartDataSet: LineScatterCandleChartDataSet { public var fillColor = UIColor(red: 140.0/255.0, green: 234.0/255.0, blue: 255.0/255.0, alpha: 1.0) public var fillAlpha = CGFloat(0.33) diff --git a/Charts/Classes/Data/LineScatterCandleChartDataSet.swift b/Charts/Classes/Data/LineScatterCandleChartDataSet.swift new file mode 100644 index 0000000000..e9053ec43b --- /dev/null +++ b/Charts/Classes/Data/LineScatterCandleChartDataSet.swift @@ -0,0 +1,45 @@ +// +// LineScatterCandleChartDataSet.swift +// Charts +// +// Created by Daniel Cohen Gindi on 29/7/15. +// +// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda +// A port of MPAndroidChart for iOS +// Licensed under Apache License 2.0 +// +// https://github.com/danielgindi/ios-charts +// + +import Foundation +import UIKit + +public class LineScatterCandleChartDataSet: BarLineScatterCandleChartDataSet +{ + /// Enables / disables the horizontal highlight-indicator. If disabled, the indicator is not drawn. + public var drawHorizontalHighlightIndicatorEnabled = true + + /// Enables / disables the vertical highlight-indicator. If disabled, the indicator is not drawn. + public var drawVerticalHighlightIndicatorEnabled = true + + public var isHorizontalHighlightIndicatorEnabled: Bool { return drawHorizontalHighlightIndicatorEnabled } + public var isVerticalHighlightIndicatorEnabled: Bool { return drawVerticalHighlightIndicatorEnabled } + + /// Enables / disables both vertical and horizontal highlight-indicators. + /// :param: enabled + public func setDrawHighlightIndicators(enabled: Bool) + { + drawHorizontalHighlightIndicatorEnabled = enabled + drawVerticalHighlightIndicatorEnabled = enabled + } + + // MARK: NSCopying + + public override func copyWithZone(zone: NSZone) -> AnyObject + { + var copy = super.copyWithZone(zone) as! LineScatterCandleChartDataSet + copy.drawHorizontalHighlightIndicatorEnabled = drawHorizontalHighlightIndicatorEnabled + copy.drawVerticalHighlightIndicatorEnabled = drawVerticalHighlightIndicatorEnabled + return copy + } +} diff --git a/Charts/Classes/Data/ScatterChartDataSet.swift b/Charts/Classes/Data/ScatterChartDataSet.swift index 520d5a0850..f3f278fedc 100644 --- a/Charts/Classes/Data/ScatterChartDataSet.swift +++ b/Charts/Classes/Data/ScatterChartDataSet.swift @@ -14,7 +14,7 @@ import Foundation import CoreGraphics -public class ScatterChartDataSet: BarLineScatterCandleChartDataSet +public class ScatterChartDataSet: LineScatterCandleChartDataSet { @objc public enum ScatterShape: Int diff --git a/Charts/Classes/Renderers/CandleStickChartRenderer.swift b/Charts/Classes/Renderers/CandleStickChartRenderer.swift index aa12e70a3e..d1eb3c0b0b 100644 --- a/Charts/Classes/Renderers/CandleStickChartRenderer.swift +++ b/Charts/Classes/Renderers/CandleStickChartRenderer.swift @@ -28,7 +28,7 @@ public protocol CandleStickChartRendererDelegate func candleStickChartRendererMaxVisibleValueCount(renderer: CandleStickChartRenderer) -> Int } -public class CandleStickChartRenderer: ChartDataRendererBase +public class CandleStickChartRenderer: LineScatterCandleRadarChartRenderer { public weak var delegate: CandleStickChartRendererDelegate? @@ -246,8 +246,7 @@ public class CandleStickChartRenderer: ChartDataRendererBase { } - private var _vertPtsBuffer = [CGPoint](count: 4, repeatedValue: CGPoint()) - private var _horzPtsBuffer = [CGPoint](count: 4, repeatedValue: CGPoint()) + private var _highlightPtsBuffer = [CGPoint](count: 4, repeatedValue: CGPoint()) public override func drawHighlighted(#context: CGContext, indices: [ChartHighlight]) { var candleData = delegate!.candleStickChartRendererCandleData(self) @@ -289,28 +288,18 @@ public class CandleStickChartRenderer: ChartDataRendererBase var low = CGFloat(e.low) * _animator.phaseY var high = CGFloat(e.high) * _animator.phaseY + var y = (low + high) / 2.0 - var min = delegate!.candleStickChartRendererChartYMin(self) - var max = delegate!.candleStickChartRendererChartYMax(self) + _highlightPtsBuffer[0] = CGPoint(x: CGFloat(xIndex), y: CGFloat(delegate!.candleStickChartRendererChartYMax(self))) + _highlightPtsBuffer[1] = CGPoint(x: CGFloat(xIndex), y: CGFloat(delegate!.candleStickChartRendererChartYMin(self))) + _highlightPtsBuffer[2] = CGPoint(x: CGFloat(delegate!.candleStickChartRendererChartXMin(self)), y: y) + _highlightPtsBuffer[3] = CGPoint(x: CGFloat(delegate!.candleStickChartRendererChartXMax(self)), y: y) - _vertPtsBuffer[0] = CGPoint(x: CGFloat(xIndex) - 0.5, y: CGFloat(max)) - _vertPtsBuffer[1] = CGPoint(x: CGFloat(xIndex) - 0.5, y: CGFloat(min)) - _vertPtsBuffer[2] = CGPoint(x: CGFloat(xIndex) + 0.5, y: CGFloat(max)) - _vertPtsBuffer[3] = CGPoint(x: CGFloat(xIndex) + 0.5, y: CGFloat(min)) + trans.pointValuesToPixel(&_highlightPtsBuffer) - _horzPtsBuffer[0] = CGPoint(x: CGFloat(delegate!.candleStickChartRendererChartXMin(self)), y: low) - _horzPtsBuffer[1] = CGPoint(x: CGFloat(delegate!.candleStickChartRendererChartXMax(self)), y: low) - _horzPtsBuffer[2] = CGPoint(x: CGFloat(delegate!.candleStickChartRendererChartXMin(self)), y: high) - _horzPtsBuffer[3] = CGPoint(x: CGFloat(delegate!.candleStickChartRendererChartXMax(self)), y: high) - - trans.pointValuesToPixel(&_vertPtsBuffer) - trans.pointValuesToPixel(&_horzPtsBuffer) - - // draw the vertical highlight lines - CGContextStrokeLineSegments(context, _vertPtsBuffer, 4) - - // draw the horizontal highlight lines - CGContextStrokeLineSegments(context, _horzPtsBuffer, 4) + // draw the lines + drawHighlightLines(context: context, points: _highlightPtsBuffer, + horizontal: set.isHorizontalHighlightIndicatorEnabled, vertical: set.isVerticalHighlightIndicatorEnabled) } } } \ No newline at end of file diff --git a/Charts/Classes/Renderers/LineChartRenderer.swift b/Charts/Classes/Renderers/LineChartRenderer.swift index 6fc208f2e1..014b1c14b9 100644 --- a/Charts/Classes/Renderers/LineChartRenderer.swift +++ b/Charts/Classes/Renderers/LineChartRenderer.swift @@ -29,7 +29,7 @@ public protocol LineChartRendererDelegate func lineChartRendererMaxVisibleValueCount(renderer: LineChartRenderer) -> Int } -public class LineChartRenderer: ChartDataRendererBase +public class LineChartRenderer: LineScatterCandleRadarChartRenderer { public weak var delegate: LineChartRendererDelegate? @@ -619,8 +619,9 @@ public class LineChartRenderer: ChartDataRendererBase trans.pointValuesToPixel(&_highlightPtsBuffer) - // draw the highlight lines - CGContextStrokeLineSegments(context, _highlightPtsBuffer, 4) + // draw the lines + drawHighlightLines(context: context, points: _highlightPtsBuffer, + horizontal: set.isHorizontalHighlightIndicatorEnabled, vertical: set.isVerticalHighlightIndicatorEnabled) } CGContextRestoreGState(context) diff --git a/Charts/Classes/Renderers/LineScatterCandleRadarChartRenderer.swift b/Charts/Classes/Renderers/LineScatterCandleRadarChartRenderer.swift new file mode 100644 index 0000000000..a364ef6733 --- /dev/null +++ b/Charts/Classes/Renderers/LineScatterCandleRadarChartRenderer.swift @@ -0,0 +1,45 @@ +// +// LineScatterCandleRadarChartRenderer.swift +// Charts +// +// Created by Daniel Cohen Gindi on 29/7/15. +// +// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda +// A port of MPAndroidChart for iOS +// Licensed under Apache License 2.0 +// +// https://github.com/danielgindi/ios-charts +// + +import Foundation +import CoreGraphics +import UIKit + +public class LineScatterCandleRadarChartRenderer: ChartDataRendererBase +{ + public override init(animator: ChartAnimator?, viewPortHandler: ChartViewPortHandler) + { + super.init(animator: animator, viewPortHandler: viewPortHandler) + } + + /// Draws vertical & horizontal highlight-lines if enabled. + /// :param: context + /// :param: points + /// :param: horizontal + /// :param: vertical + public func drawHighlightLines(#context: CGContext, points: UnsafePointer, horizontal: Bool, vertical: Bool) + { + // draw vertical highlight lines + if vertical + { + CGContextStrokeLineSegments(context, points, 2) + } + + // draw horizontal highlight lines + if horizontal + { + var pts = UnsafePointer() + CGContextStrokeLineSegments(context, points.advancedBy(2), 2) + } + } +} \ No newline at end of file diff --git a/Charts/Classes/Renderers/RadarChartRenderer.swift b/Charts/Classes/Renderers/RadarChartRenderer.swift index 2fcbc5258e..6598209bd8 100644 --- a/Charts/Classes/Renderers/RadarChartRenderer.swift +++ b/Charts/Classes/Renderers/RadarChartRenderer.swift @@ -15,7 +15,7 @@ import Foundation import CoreGraphics import UIKit -public class RadarChartRenderer: ChartDataRendererBase +public class RadarChartRenderer: LineScatterCandleRadarChartRenderer { internal weak var _chart: RadarChartView! @@ -225,7 +225,7 @@ public class RadarChartRenderer: ChartDataRendererBase CGContextRestoreGState(context) } - private var _lineSegments = [CGPoint](count: 4, repeatedValue: CGPoint()) + private var _highlightPtsBuffer = [CGPoint](count: 4, repeatedValue: CGPoint()) public override func drawHighlighted(#context: CGContext, indices: [ChartHighlight]) { @@ -283,11 +283,14 @@ public class RadarChartRenderer: ChartDataRendererBase var p = ChartUtils.getPosition(center: center, dist: CGFloat(y) * factor, angle: sliceangle * CGFloat(j) + _chart.rotationAngle) - _lineSegments[0] = CGPoint(x: p.x, y: 0.0) - _lineSegments[1] = CGPoint(x: p.x, y: viewPortHandler.chartHeight) - _lineSegments[2] = CGPoint(x: 0.0, y: p.y) - _lineSegments[3] = CGPoint(x: viewPortHandler.chartWidth, y: p.y) - CGContextStrokeLineSegments(context, _lineSegments, 4) + _highlightPtsBuffer[0] = CGPoint(x: p.x, y: 0.0) + _highlightPtsBuffer[1] = CGPoint(x: p.x, y: viewPortHandler.chartHeight) + _highlightPtsBuffer[2] = CGPoint(x: 0.0, y: p.y) + _highlightPtsBuffer[3] = CGPoint(x: viewPortHandler.chartWidth, y: p.y) + + // draw the lines + drawHighlightLines(context: context, points: _highlightPtsBuffer, + horizontal: set.isHorizontalHighlightIndicatorEnabled, vertical: set.isVerticalHighlightIndicatorEnabled) } CGContextRestoreGState(context) diff --git a/Charts/Classes/Renderers/ScatterChartRenderer.swift b/Charts/Classes/Renderers/ScatterChartRenderer.swift index 760aa321bc..0fd6ccd1f7 100644 --- a/Charts/Classes/Renderers/ScatterChartRenderer.swift +++ b/Charts/Classes/Renderers/ScatterChartRenderer.swift @@ -28,7 +28,7 @@ public protocol ScatterChartRendererDelegate func scatterChartRendererMaxVisibleValueCount(renderer: ScatterChartRenderer) -> Int } -public class ScatterChartRenderer: ChartDataRendererBase +public class ScatterChartRenderer: LineScatterCandleRadarChartRenderer { public weak var delegate: ScatterChartRendererDelegate? @@ -241,6 +241,8 @@ public class ScatterChartRenderer: ChartDataRendererBase } + private var _highlightPtsBuffer = [CGPoint](count: 4, repeatedValue: CGPoint()) + public override func drawHighlighted(#context: CGContext, indices: [ChartHighlight]) { var scatterData = delegate!.scatterChartRendererData(self) @@ -251,8 +253,6 @@ public class ScatterChartRenderer: ChartDataRendererBase CGContextSaveGState(context) - var pts = [CGPoint](count: 4, repeatedValue: CGPoint()) - for (var i = 0; i < indices.count; i++) { var set = scatterData.getDataSetByIndex(indices[i].dataSetIndex) as! ScatterChartDataSet! @@ -288,17 +288,18 @@ public class ScatterChartRenderer: ChartDataRendererBase var y = CGFloat(yVal) * _animator.phaseY; // get the y-position - pts[0] = CGPoint(x: CGFloat(xIndex), y: CGFloat(chartYMax)) - pts[1] = CGPoint(x: CGFloat(xIndex), y: CGFloat(chartYMin)) - pts[2] = CGPoint(x: CGFloat(chartXMin), y: y) - pts[3] = CGPoint(x: CGFloat(chartXMax), y: y) + _highlightPtsBuffer[0] = CGPoint(x: CGFloat(xIndex), y: CGFloat(chartYMax)) + _highlightPtsBuffer[1] = CGPoint(x: CGFloat(xIndex), y: CGFloat(chartYMin)) + _highlightPtsBuffer[2] = CGPoint(x: CGFloat(chartXMin), y: y) + _highlightPtsBuffer[3] = CGPoint(x: CGFloat(chartXMax), y: y) var trans = delegate!.scatterChartRenderer(self, transformerForAxis: set.axisDependency) - trans.pointValuesToPixel(&pts) + trans.pointValuesToPixel(&_highlightPtsBuffer) - // draw the highlight lines - CGContextStrokeLineSegments(context, pts, pts.count) + // draw the lines + drawHighlightLines(context: context, points: _highlightPtsBuffer, + horizontal: set.isHorizontalHighlightIndicatorEnabled, vertical: set.isVerticalHighlightIndicatorEnabled) } CGContextRestoreGState(context) diff --git a/ChartsDemo/Classes/Demos/CubicLineChartViewController.m b/ChartsDemo/Classes/Demos/CubicLineChartViewController.m index d64e5e5f3c..e3a6e9eb6a 100644 --- a/ChartsDemo/Classes/Demos/CubicLineChartViewController.m +++ b/ChartsDemo/Classes/Demos/CubicLineChartViewController.m @@ -103,6 +103,7 @@ - (void)setDataCount:(int)count range:(double)range set1.highlightColor = [UIColor colorWithRed:244/255.f green:117/255.f blue:117/255.f alpha:1.f]; [set1 setColor:[UIColor colorWithRed:104/255.f green:241/255.f blue:175/255.f alpha:1.f]]; set1.fillColor = [UIColor colorWithRed:51/255.f green:181/255.f blue:229/255.f alpha:1.f]; + set1.drawHorizontalHighlightIndicatorEnabled = NO; LineChartData *data = [[LineChartData alloc] initWithXVals:xVals dataSet:set1]; [data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:9.f]]; diff --git a/ChartsDemo/Classes/Demos/LineChart1ViewController.m b/ChartsDemo/Classes/Demos/LineChart1ViewController.m index 835623216c..52a3e7a541 100644 --- a/ChartsDemo/Classes/Demos/LineChart1ViewController.m +++ b/ChartsDemo/Classes/Demos/LineChart1ViewController.m @@ -52,7 +52,6 @@ - (void)viewDidLoad _chartView.descriptionText = @""; _chartView.noDataTextDescription = @"You need to provide data for the chart."; - _chartView.highlightEnabled = NO; _chartView.dragEnabled = YES; [_chartView setScaleEnabled:YES]; _chartView.pinchZoomEnabled = YES;