Bar chart with percentage

Hi, I would like to have a time series chart, with bars, which displays a value over time and also how that value is composed in % by its sub-categories.

For example: income from cars selling:
1 March, $45000, (30% AUDI, 50% BMW, 20% MERCEDES)
2 March, $25000, (10% AUDI, 80% BMW, 10% MERCEDES)

Hence I would like that the height of the bar to be a representation of the income (es. $45000) and the bar itself to be divided into its three colors/categories (AUDI; BMW and MERCEDES), respecting the percentage.

Welcome @glatorre
Can you provide details of your datasource where this data is being stored, and some of the sample data?

Hi, I’m using mongodb where each document currently is in this form:

    "value" : 45000,
    "timestamp" : 1678709584000,
    		"name": "BMW",
    		"perc": 10
    		"name": "MERCEDES",
    		"perc": 10
    		"name": "AUDI",
    		"perc": 80

Anyway I have full control of my data model and I can modify it if necessary


Hi @glatorre,

I used a testDB data to simply fill in some values and then use the Unit option as a percentage and then it shows the values in a percentage format.

I hope this helps.

That does not look accurate: 3000%?

It’s based on csv values which are not real but if the user does have values in the range of 0 - 100 then with unit option can display the percentage.

This is to what I understand he wants to display unless provide some more feedback,

1 Like