2014-09-19 38 views
0

如何将逗号更改为高点上的点?我如何用逗号在逗号中填入y列号格式?

y列属性附带逗号。但是我想把它改成点。

这里是我的代码:用它来展示给的年值

<script> 
    Highcharts.setOptions({ 
     lang: { 
      drillUpText: '◁ {series.name}\' e Geri Dön', 
      decimalPoint: '.' 
     } 
    }); 
    var options = { 
     chart: { 
      height: 300 
     }, 
     title: { 
      text: 'Yıllara Göre Düşük Sayıları' 
     }, 
     xAxis: { 
      categories: true 
     }, 
     drilldown: { 
      series: [{ 
       id: '2010', 
       name: '2010', 
       data: [ 
        ['Apples', 4], 
        ['Pears', 6], 
        ['Oranges', 2], 
        ['Grapes', 8] 
       ] 
      }, { 
       id: 'cars', 
       name: 'Cars', 
       data: [{ 
        name: 'Toyota', 
        y: 4, 
        drilldown: 'toyota' 
       }, 
       ['Volkswagen', 3], 
       ['Opel', 5] 
       ] 
      }, { 
       id: 'toyota', 
       name: 'Toyota', 
       data: [ 
        ['RAV4', 3], 
        ['Corolla', 1], 
        ['Carina', 4], 
        ['Land Cruiser', 5] 
       ] 
      }] 
     }, 
     legend: { 
      enabled: false 
     }, 
     plotOptions: { 
      series: { 
       dataLabels: { 
        enabled: true 
       }, 
       shadow: false 
      }, 
      pie: { 
       size: '80%' 
      } 
     }, 
     series: [{ 
      name: 'Overview', 
      colorByPoint: true, 
      data: [$degerToplam] 
     }] 
    }; 
    // Column chart 
    options.chart.renderTo = 'container1'; 
    options.chart.type = 'column'; 
    var chart1 = new Highcharts.Chart(options); 
</script> 

enter image description here

荫。我试过

  lang: { 
       drillUpText: '◁ {series.name}\' e Geri Dön', 
       decimalPoint: '.' 
      } 

但它不能帮助我。

回答

2

您使用decimalPoint,但你真正想要的是thousandsSep。其实,你可能想都

Highcharts.setOptions({ 
    lang: { 
     drillUpText: '◁ {series.name}\' e Geri Dön', 
     decimalPoint: ',', // <== Most locales that use `.` for thousands use `,` for decimal, but adjust if that's not true in your locale 
     thousandsSep: '.' // <== Uses `.` for thousands 
    } 
}); 
+0

谢谢它的工作原理。 – user3763026 2014-09-19 14:38:33

1

如果我理解正确的问题,试试这个:

Highcharts.setOptions({ 
    lang: { 
     thousandsSep: '.' 
    } 
}); 
+0

我总是建议不只是“试试这个”,但说** **你改变了什么,以及为什么** **。 – 2014-09-19 14:09:36

+0

你是对的... – Tobia 2014-09-19 14:13:58