2014-09-19 39 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