I'm creating some pie charts with Plotly.js but I can't figure out how to set the value format. If my number is 19.231, I get 19.2. I want 19.2310, with 4 digit precision. My data and layout follow here:
var data = [{
values: values,
labels: labels,
type: 'pie',
marker: {
colors: colors
},
textfont: {
family: 'Helvetica, sans-serif',
size: 48,
color: '#000'
}
}];
var layout = {
height: 1350,
width: 1500,
title: title,
titlefont: {
family: 'Helvetica, sans-serif',
size: 58,
color: '#000'
},
legend: {
x: 1.1,
y: 0.5,
size: 40,
font: {
family: 'Helvetica, sans-serif',
size: 48,
color: '#000'
}
}
};
var values = [1, 2, 4.6];you get 13.2%, 26.3% and 60.5% instead of 13.1579%, 26.3158% and 60.5263%