Rails: Pie Charts legend in Chartkicks -


in highcharts show percentage along pie_charts, legend can customized this:

legend: {labelformat: '{name} : {y} ({percentage}%)'} 

but in chartkicks can't find how this?

if @ documentation specified on chartkick gem homepage, says:

you can pass options directly charting library with:  <%= line_chart data, library: {backgroundcolor: "#eee"} %> 

so in scenario, should try like:

<%= pie_chart data, library: {legend: {labelformat: '{name} : {y} ({percentage}%)'}} %> 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -