Skip to content

Commit

Permalink
ChartsOrg#3578 Add missing properties to copy(with:) methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dstranz committed Oct 26, 2018
1 parent 3b07904 commit 3c75a83
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Source/Charts/Data/Implementations/ChartBaseDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,19 @@ open class ChartBaseDataSet: NSObject, IChartDataSet
copy.colors = colors
copy.valueColors = valueColors
copy.label = label
copy.axisDependency = axisDependency
copy.highlightEnabled = highlightEnabled
copy._valueFormatter = _valueFormatter
copy.valueFont = valueFont
copy.form = form
copy.formSize = formSize
copy.formLineWidth = formLineWidth
copy.formLineDashPhase = formLineDashPhase
copy.formLineDashLengths = formLineDashLengths
copy.drawValuesEnabled = drawValuesEnabled
copy.drawValuesEnabled = drawValuesEnabled
copy.iconsOffset = iconsOffset
copy.visible = visible

return copy
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ open class BarChartDataEntry: ChartDataEntry
copy._yVals = _yVals
copy.y = y
copy._negativeSum = _negativeSum
copy._positiveSum = _positiveSum
return copy
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ open class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBarChartDat
copy.stackLabels = stackLabels

copy.barShadowColor = barShadowColor
copy.barBorderWidth = barBorderWidth
copy.barBorderColor = barBorderColor
copy.highlightAlpha = highlightAlpha
return copy
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ open class BubbleChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBubbleCh
copy._xMin = _xMin
copy._xMax = _xMax
copy._maxSize = _maxSize
copy.normalizeSizeEnabled = normalizeSizeEnabled
copy.highlightCircleWidth = highlightCircleWidth
return copy
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ open class ChartDataSet: ChartBaseDataSet
copy.values = values
copy._yMax = _yMax
copy._yMin = _yMin
copy._xMax = _xMax
copy._xMin = _xMin

return copy
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,17 @@ open class LineChartDataSet: LineRadarChartDataSet, ILineChartDataSet
{
let copy = super.copyWithZone(zone) as! LineChartDataSet
copy.circleColors = circleColors
copy.circleHoleColor = circleHoleColor
copy.circleRadius = circleRadius
copy.circleHoleRadius = circleHoleRadius
copy.cubicIntensity = cubicIntensity
copy.lineDashPhase = lineDashPhase
copy.lineDashLengths = lineDashLengths
copy.lineCapType = lineCapType
copy.drawCirclesEnabled = drawCirclesEnabled
copy.drawCircleHoleEnabled = drawCircleHoleEnabled
copy.mode = mode
copy._fillFormatter = _fillFormatter
return copy
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ open class LineRadarChartDataSet: LineScatterCandleRadarChartDataSet, ILineRadar
open override func copyWithZone(_ zone: NSZone?) -> AnyObject
{
let copy = super.copyWithZone(zone) as! LineRadarChartDataSet
copy.fillColor = fillColor
copy.fill = fill
copy.fillAlpha = fillAlpha
copy._fillColor = _fillColor
copy._lineWidth = _lineWidth
copy.drawFilledEnabled = drawFilledEnabled
return copy
Expand Down
11 changes: 11 additions & 0 deletions Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,18 @@ open class PieChartDataSet: ChartDataSet, IPieChartDataSet
{
let copy = super.copyWithZone(zone) as! PieChartDataSet
copy._sliceSpace = _sliceSpace
copy.automaticallyDisableSliceSpacing = automaticallyDisableSliceSpacing
copy.selectionShift = selectionShift
copy.xValuePosition = xValuePosition
copy.yValuePosition = yValuePosition
copy.valueLineColor = valueLineColor
copy.valueLineWidth = valueLineWidth
copy.valueLinePart1OffsetPercentage = valueLinePart1OffsetPercentage
copy.valueLinePart1Length = valueLinePart1Length
copy.valueLinePart2Length = valueLinePart2Length
copy.valueLineVariableLength = valueLineVariableLength
copy.entryLabelFont = entryLabelFont
copy.entryLabelColor = entryLabelColor
copy.highlightColor = highlightColor
return copy
}
Expand Down

0 comments on commit 3c75a83

Please sign in to comment.