Question on Vega Circle plot


I'm using Elastic 7.17 version and trying to create Circle visualization using Vega.
I have the below sample data;


I'm calculating score % for each 'Stage' with some weightage for each 'Indicator' using below formula;

(sum(score,kql='indicator: i1')/sum(maxscore,kql='indicator: i1')*100*0.5)+(sum(score,kql='indicator: i2')/sum(maxscore,kql='indicator: i2')*100*0.3)+(sum(score,kql='indicator: i3')/sum(maxscore,kql='indicator: i3')*100*0.2)

So, for the able sample data, the score% will look like below;
stage1 = 25+7.5+20 = 52.5%
stage2 = 25+15+7.5 = 47.5%

Based on below scoring% range, I need to represent each stage as Red, Yellow and Green
-- 0% - 50% ---> RED
-- 50% - 80% ---> YELLOW
-- 80% - 100% --> GREEN

I'm looking to achieve as below;

Please let me know;

  1. Can the Circle visualization be achieved using Vega with the Data set and Formula mentioned above?
  2. Can the above score calculation formula be used in Vega as is, if so, how to achieve it (I couldn't find any documentation on the same) ?
  3. Is there any sample Circle Vega code I can refer to (not the 'Arc' mark type) ?

Thanks in Advance!

Using Lens 'Metric' and 'Table' I'm able to achieve below visualizations with the formula, but, couldn't achieve the 'Circular' visualization;

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.