Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify for Character Alert: characters is deprecated #2942

Merged
merged 1 commit into from
Nov 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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