Skip to content

Commit

Permalink
docs fix; format removed from config;
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaBeliaev committed Jul 9, 2017
1 parent f9121c7 commit de7d098
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/axes/cartesian/timeseries.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var chart = new Chart(ctx, {
options: {
scales: {
xAxes: [{
type: 'timeseries',
time: {
unit: 'month'
}
Expand Down
5 changes: 3 additions & 2 deletions src/scales/scale.timebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ module.exports = function(Chart) {
// Get tooltip label
getLabelForIndex: function(index, datasetIndex) {
var me = this;
var label = me.chart.data.labels && index < me.chart.data.labels.length ? me.chart.data.labels[index] : '';
var value = me.chart.data.datasets[datasetIndex].data[index];
var chartData = me.chart.data;
var label = chartData.labels && index < chartData.labels.length ? chartData.labels[index] : '';
var value = chartData.datasets[datasetIndex].data[index];

if (value !== null && typeof value === 'object') {
label = me.getRightValue(value);
Expand Down
1 change: 0 additions & 1 deletion src/scales/scale.timeseries.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module.exports = function(Chart) {
format: false, // DEPRECATED false == date objects, moment object, callback or a pattern string from http://momentjs.com/docs/#/parsing/string-format/
unit: false, // false == automatic or override with week, month, year, etc.
round: false, // none, or override with week, month, year, etc.
displayFormat: false, // DEPRECATED
minUnit: 'millisecond',

// defaults to unit's corresponding unitFormat below or override using pattern string from http://momentjs.com/docs/#/displaying/format/
Expand Down
1 change: 0 additions & 1 deletion test/specs/scale.timeseries.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ describe('TimeSeries scale tests', function() {
format: false,
unit: false,
round: false,
displayFormat: false,
minUnit: 'millisecond',
displayFormats: {
millisecond: 'h:mm:ss.SSS a', // 11:20:01.123 AM
Expand Down

0 comments on commit de7d098

Please sign in to comment.