I created a pie view however as the value is very close to 100 percent, it doesn't really show the result as it rounds to 100 as follows in the image
287/5000
if you look you will see that in the graph it shows the result was not 100 percent Normalized. Well I would like to make it show the real value even if it has to have many decimal places.
another thing would like the percentage to be 100% not below the name, but beside it.
Expession Editor
filters
| essql
query="SELECT
case
when sum(segrelatorio) is null then 0
else ROUND(sum(segrelatorio),9) end as tempo,severidade
FROM
\"YYYYYY*\"
WHERE
-- ky != 'icmpping'
grupo.name = 'XXXXX'
AND severidade != 'Average'
GROUP BY severidade
ORDER BY severidade"
| pointseries color="severidade" size="tempo"
| pie hole=0 labels=true legend=false labelRadius=100 palette={palette "#ff0000" "#f2bc33" "#3f9939" "#ca5f35" gradient=false}
| render
css=".pieLabel:nth-child(3) {
margin: 40px 0px 0px 120px;
}
.pieLabel:nth-child(4) {
margin: 70px 0px 0px 110px;
}
.pieLabel:nth-child(5) {
margin: -110px 0px 0px 130px;
}
.pieLabel:nth-child(6) {
margin: 130px 0px 0px 120px;
}
.pieLabel:nth-child(8) {
margin: 130px 0px 0px 130px;
}
" containerStyle={containerStyle overflow="visible"}
Hi @francieliton_araujo, unfortunately the Canvas Pie Chart percentage numbers on labels cannot be customized. A workaround I found is to generate your own legend using the markdown element.
For the Kibana Flights data sample, a pie chart by carrier would have this appearance:
SELECT
round(count(ALL CASE WHEN "Carrier" = 'ES-Air' THEN 1 ELSE NULL END)/(count(1) * 1.0)*100,3) as esair,
round(count(ALL CASE WHEN "Carrier" = 'Kibana Airlines' THEN 1 ELSE NULL END)/(count(1) * 1.0)*100,3) as kibana,
round(count(ALL CASE WHEN "Carrier" = 'Logstash Airways' THEN 1 ELSE NULL END)/(count(1) * 1.0)*100,3) as logstash,
round(count(ALL CASE WHEN "Carrier" = 'JetBeats' THEN 1 ELSE NULL END)/(count(1) * 1.0)*100,3) as jetbeats
FROM "kibana_sample_data_flights"
And the following markdown and css to tweak the labels for the colors:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.