-
Notifications
You must be signed in to change notification settings - Fork 720
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
introduced xAxisLabelFormatter #302
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ export default class AxisChart extends BaseChart { | |
this.config.yAxisMode = options.axisOptions.yAxisMode || 'span'; | ||
this.config.xIsSeries = options.axisOptions.xIsSeries || 0; | ||
this.config.shortenYAxisNumbers = options.axisOptions.shortenYAxisNumbers || 0; | ||
this.config.xAxisLabelFormatter = options.xAxisLabelFormatter || getShortenedLabels; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you move this is |
||
|
||
this.config.formatTooltipX = options.tooltipOptions.formatTooltipX; | ||
this.config.formatTooltipY = options.tooltipOptions.formatTooltipY; | ||
|
@@ -210,9 +211,7 @@ export default class AxisChart extends BaseChart { | |
}, | ||
function() { | ||
let s = this.state; | ||
s.xAxis.calcLabels = getShortenedLabels(this.width, | ||
s.xAxis.labels, this.config.xIsSeries); | ||
|
||
s.xAxis.calcLabels = this.config.xAxisLabelFormatter(this.width, s.xAxis.labels, this.config.xIsSeries); | ||
return s.xAxis; | ||
}.bind(this) | ||
], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this portion of README from the PR?