Closed voltamperoff closed 7 years ago
The language option is global, so it should go under 'setupOptions' instead of 'options', like this:
echo Highstock::widget([
'setupOptions' => [
'lang' => [
'months' => [
'Январь', 'Февраль', 'Март',
'Апрель', 'Май', 'Июнь',
'Июль', 'Август', 'Сентябрь',
'Октябрь', 'Ноябрь', 'Декабрь',
],
'weekdays' => [
'Понедельник',
'Вторник',
'Среда',
'Четверг',
'Пятница',
'Суббота',
'Воскресение',
],
'shortMonths' => [
'Янв', 'Фев', 'Мар',
'Апр', 'Май', 'Июн',
'Июл', 'Авг', 'Сен',
'Окт', 'Ноя', 'Дек',
],
'shortWeekdays' => [
'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс',
],
'rangeSelectorFrom' => 'Начало',
'rangeSelectorTo' => 'Конец',
'rangeSelectorZoom' => 'Период',
]
],
'options' => [
'title' => [
'text' => null,
],
'legend' => [
'enabled' => true,
'alignment'
],
'chart' => [
'backgroundColor' => '#F7F7FC',
'height' => '600',
'zoomType' => 'x',
],
'xAxis' => [
'type' => 'datetime',
],
'tooltip' => [
'valueDecimals' => 2,
],
'series' => $series,
]
]);
Note, you only have to specify it (or any other global options) on the first chart, and it will automatically apply to all other charts on the page.
You save me! Thank you very much!!!
I've tried to add "lang" array with necessary strings, but it doesn't have any effect. http://api.highcharts.com/highcharts/lang Source: