8000 Localize auto-formatted x-axis date ticks by TomDemulierChevret · Pull Request #2261 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Localize auto-formatted x-axis date ticks #2261

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

Prev Previous commit
Next Next commit
Move up formatKeys array to respect syntax declaration order
  • Loading branch information
TomDemulierChevret committed Jan 22, 2018
commit 14a14d897705bb56756dc7d5c6bad950c5c58cbc
20 changes: 10 additions & 10 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ plots.sendDataToCloud = function(gd) {
return false;
};

var d3FormatKeys = [
'days', 'shortDays', 'months', 'shortMonths', 'periods',
'dateTime', 'date', 'time',
'decimal', 'thousands', 'grouping', 'currency'
];

var extraFormatKeys = [
'year', 'month', 'dayMonth', 'dayMonthYear'
];

// Fill in default values:
//
// gd.data, gd.layout:
Expand Down Expand Up @@ -482,16 +492,6 @@ function remapTransformedArrays(cd0, newTrace) {
}
}

var d3FormatKeys = [
'days', 'shortDays', 'months', 'shortMonths', 'periods',
'dateTime', 'date', 'time',
'decimal', 'thousands', 'grouping', 'currency'
];

var extraFormatKeys = [
'year', 'month', 'dayMonth', 'dayMonthYear'
];

/**
* getFormatObj: use _context to get the format object from locale.
* Used to get d3.locale argument object and extraFormat argument object
Expand Down
0