diff --git a/src/Chart/ChartView.php b/src/Chart/ChartView.php index 79fbf8005d18220cbb654a3c0feede2d4a66d828..6d7efeb1f804467291b80ae5ed54e2b541197283 100644 --- a/src/Chart/ChartView.php +++ b/src/Chart/ChartView.php @@ -37,6 +37,7 @@ class ChartView implements ChartViewInterface { $resolver->setDefaults([ 'type' => 'bar', + 'locale' => 'it', 'height' => null, 'width' => null, 'zoomReload' => false, diff --git a/src/Resources/views/apex.js.twig b/src/Resources/views/apex.js.twig index 79cf763b886251c9598e159c5a6bc38187a1c70f..acee38985541aed018c9a70fea86f4d858641b18 100644 --- a/src/Resources/views/apex.js.twig +++ b/src/Resources/views/apex.js.twig @@ -1,6 +1,7 @@ $(function () { var options = { chart: { + {% if options.locale === 'it' %} defaultLocale: 'it', locales: [{ name: 'it', @@ -20,6 +21,7 @@ $(function () { } } }], + {% endif %} type: '{{ options.type }}', {% if options.height %} height: {{ options.height }},