1

Is there a token that shows the percentage of each stack in relation to the whole chart? In the Chart below, I am using %pper, but it is giving me the top node over the node total for the chart. %pper works fine for non-stacked bar charts, but I'm looking for something that treats the stack as a single node.

Basically this: %stack-percent = %stack-total / %chart-total, where %chart-total is the sum of all values in the chart.

enter image description here

Here is a span shot of the data in excel. I'm looking for the numbers in orange. However, all I can get are the numbers in blue using %pper or %npv.

enter image description here

Here is my code for the value-box

"value-box":{
    "text":"%pper%",
    "placement":"top",
    "type":"all",
    "decimals":0,
    "font-size":12,
    "font-color":"black",
    "font-family":"Consolas",
     "rules": [
        {
        "rule": "%stack-top == 0",
        "visible": 0
        }
    ]
}
rrk
  • 15,677
  • 4
  • 29
  • 45
Mike
  • 63
  • 6
  • Since you know the correct formula, why don't you simply code it and display the result? – Dan Bracuk Jun 23 '20 at 16:40
  • @DanBracuk: Unfortunately, %chart-total doesn't exist, that I can find. Also, I have not seen any docs that explain how to do token math. I have tried defining a %data-xxx, but can't get it to display with data. – Mike Jun 23 '20 at 17:18
  • You mean you don't have the data that you are graphing? – Dan Bracuk Jun 23 '20 at 18:23
  • @DanBracuk: The data is coming from the database, and I have added a field for the calculated period totals. But displaying a double bar, 1 stacked, 1 not, just to display the stack percentage is confusing to the client. – Mike Jun 23 '20 at 20:05

0 Answers0