Vincent Decaux
Vincent Decaux

Reputation: 10724

Highcharts set percent to datatable

As you can see on this JSFiddle, I want to show "%" to values in the dataTable below the graph : http://jsfiddle.net/fa32gywh/

I tried every options in my options :

plotOptions: {
    series: {
        dataLabels: {
            enabled: true,
            format: '{y} %'
        }
    }
},
yAxis: {
    min: 0,
    title: {
        text: ''
    },
    labels: {
        format: '{value}%'
    }
},

It works for my graph, but not the data in the dataTable.

Upvotes: 1

Views: 125

Answers (1)

Barbara Laird
Barbara Laird

Reputation: 12717

You can style the table with css. Note that my selector works because you only have one series If you had multiple, you would have to be more specific.

.highcharts-data-table td.number:after {
  content: '%'
}

http://jsfiddle.net/fa32gywh/1/

Upvotes: 2

Related Questions