Changing covid-19 data / charts

Hi Dundas users! I am working on a dashboard with VERY clean data for Covid-19 results from our organization. I have created a stacked bar chart and pie chart showing information about our positive / negavite / pending results. HOWEVER, whenever we have no pending results all of my data gets bumped around. For instance the colors I chose to represent data points seem to select from the top down for data label as well as pie chart - so for instance,

when my pie chart has all 3 results, I have grey, magenta, and green - grey pending, magenta for covid positive, green for covid negative. But whenever we have all of our lab results in there are no “pendings” (Nulls) and then it dissapears from the pie chart changing positive to grey and negative to magenta… I’m not sure how to account for this or fix this or how to get one set of results to keep their “place” and their color even when there are 0 rows associated.

The same thing also happens to my “pending” data label which counts unknowns / nulls / which are results I’m currently waiting on. When there are 0 rows instead of it saying 0 I “lose” the category and it just says how many positive are on there by default.

Has anyone had this problem / how do you deal with it?

Hi Heather,

I think the problem is that you are using a colour palette and as the number of series changes, the series assignment is changing.

You’d probably be best if you tried to assign colours using a colour rule and a state. You could setup various states for each possible value (positive/negative/pending) and then have the colours set.

I’ll make a video and post it for you shortly.

2 Likes

Here is the video that I promised to show you how to colour based on a dimension member value. do this for each of your expected values.

Thanks Jeff! this does look like it should work for color, I will try that.

For data labels when I’m using %total formula of a set, do you know if there is a way to manually select which value it chooses? For my data so far it seems like IF I have covid results with 3 different results and I’m trying to add % positive, if I filter and only show positive it will show 100% but if I don’t, it won’t let me sort positive to the top - it’s alphabetical. (though I maybe able to just adjust for that somehow in my data I suppose)

Hi Heather,

Single value controls like the data label, data image, state indicator etc. will only ever support one returned value. If you are somehow returning more than one value, it will always choose the first one and you cannot change this. If you have to return more than one value, yes, you’ll have to do something like sort the values to put the one you want at the top.

1 Like

Hi everyone and sorry for reviving this topic.

This solution is fine, but what if I want to use Dynamic Hierarchies? I have a single pie chart and I want to use it for x attributes of my product without creating x pies. Dynamic hierarchies are very good for this!

But I can only assign color rules and states to the default dynamic hiearchy selected. I would like to do this operation for all the dynamic hiearchies that I plan to use or test and set the color by testing the data content no matter what hierarchy is used.

This is unfortunate because I do and I plan to use dynamic hiearchies a lot and I don’t know how to this can be done, I need to avoid the 100% color being the same for “true” or “false”.

Every input is welcomed! Maybe a workaround can be done with scripting?

Thanks,

Gianluca.

Probably I’ve done it by using the source null options with value 0 so that there’s always a row even if there’s zero, I’m still testing it but seems to work fine.

But a more refined way to control colors would be needed also for Dynamic hiearchies, to source nulls doesn’t seems the best approach in the long run.