Hi to all the great team!
I have an index with 2 docs where i store active / inactive systems (one doc for 'active' and the other doc for 'inactive'). This index is refreshed every 10 minutes with new values of active / inactive systems.
How can i change the color - label names in top right of my pie chart as it is shown in the image below? I just want to display 'active' for the green and 'inactive' for the blue.
If you control the ingested data, consider changing the shape of your documents to something like: { type: "active", count: 24 } { type: "inactive", count: 2 }
Then you can create your pie chart by using a terms agg on the type field for your slices and a sum agg on count for your values. the pie chart will pick up the type values as labels for the legend automatically.
Hi again!
Thanks! I did what you said and is ok at some point (i mean the label on top right), but i lost the numbers on the circle. Is there any way to keep my numbers there?
See below:
Unfortunately the pie chart will always show percentages, not total values.
If you know for sure there will always be 2 documents in your index, you could put the count in the type as well: { type: "active 24", count: 24 } { type: "inactive 2", count: 2 }
However, I suggest switching to a vertical bar chart, you can show the total values as part of the bar there like this:
Maybe you have to refresh your field list. Go to management > index patterns > and press the reload button in the top right. This should pull in new field names.
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.