Skip to content

Commit

Permalink
Merge pull request #2942 from suzuhiroruri/fix_character_deprecated
Browse files Browse the repository at this point in the history
modify for Character Alert: characters is deprecated
  • Loading branch information
liuxuan30 authored Nov 3, 2017
2 parents bdbdaa6 + 021d5fb commit 98552bb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate

let frame = self.bounds

if _data === nil && noDataText.characters.count > 0
if _data === nil && noDataText.count > 0
{
context.saveGState()
defer { context.restoreGState() }
Expand Down Expand Up @@ -391,7 +391,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
let description = chartDescription,
description.isEnabled,
let descriptionText = description.text,
descriptionText.characters.count > 0
descriptionText.count > 0
else { return }

var position = description.position
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Components/AxisBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ open class AxisBase: ComponentBase
{
let text = getFormattedLabel(i)

if longest.characters.count < text.characters.count
if longest.count < text.count
{
longest = text
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Renderers/XAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ open class XAxisRenderer: AxisRendererBase
let label = limitLine.label

// if drawing the limit-value label is enabled
if limitLine.drawLabelEnabled && label.characters.count > 0
if limitLine.drawLabelEnabled && label.count > 0
{
let labelLineHeight = limitLine.valueFont.lineHeight

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ open class XAxisRendererHorizontalBarChart: XAxisRenderer
let label = l.label

// if drawing the limit-value label is enabled
if l.drawLabelEnabled && label.characters.count > 0
if l.drawLabelEnabled && label.count > 0
{
let labelLineHeight = l.valueFont.lineHeight

Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Renderers/YAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ open class YAxisRenderer: AxisRendererBase
let label = l.label

// if drawing the limit-value label is enabled
if l.drawLabelEnabled && label.characters.count > 0
if l.drawLabelEnabled && label.count > 0
{
let labelLineHeight = l.valueFont.lineHeight

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ open class YAxisRendererHorizontalBarChart: YAxisRenderer
let label = l.label

// if drawing the limit-value label is enabled
if l.drawLabelEnabled && label.characters.count > 0
if l.drawLabelEnabled && label.count > 0
{
let labelLineHeight = l.valueFont.lineHeight

Expand Down

0 comments on commit 98552bb

Please sign in to comment.