forked from plotly/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'source-design-merge' into update_GTM
- Loading branch information
Showing
6 changed files
with
121 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
_posts/plotly_js/fundamentals/config-options/2015-09-24-config-locale.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Change the Default Locale | ||
plot_url: https://codepen.io/plotly/embed/rqrgEQ/?height=600&theme-id=15263&default-tab=result | ||
language: plotly_js | ||
suite: configuration | ||
order: 7.5 | ||
sitemap: false | ||
arrangement: horizontal | ||
markdown_content: | | ||
Load and register a non-default locale by adding `<script src="https://cdn.plot.ly/plotly-locale-YOUR-LOCALE-latest.js"></script>` | ||
to your HTML after the plotly.js tag and then reference the locale in the `config`. For Example, the codepen example below has | ||
`<script src="https://cdn.plot.ly/plotly-locale-fr-latest.js"></script>` in its HTML. For more information and a list of available locales, see | ||
[https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization](https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization) | ||
--- | ||
var trace1 = { | ||
type: "scatter", | ||
mode: "lines", | ||
x: ['2018-01-01', '2018-08-31'], | ||
y: [10, 5], | ||
line: {color: '#17BECF'} | ||
}; | ||
|
||
var trace2 = { | ||
type: "scatter", | ||
mode: "lines", | ||
x: ['2018-01-01', '2018-08-31'], | ||
y: [3,7], | ||
line: {color: '#7F7F7F'} | ||
}; | ||
|
||
var data = [trace1,trace2]; | ||
|
||
var layout = { | ||
title: 'Custom Locale', | ||
}; | ||
|
||
var config = {locale: 'fr'}; | ||
|
||
Plotly.newPlot('myDiv', data, layout, config); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.