How to merge Bar graph and Line Graph into the same panel

Hello,
I’m working on my first complex Graph using Grafana and influxdb.
thanks in advance for your support
I would like to display the Graph in 2 parts, one axe using bar graph (separate bar) with the electric consumption, one axe using lines with the electric cost.
I have created 3 queries to get electric consumption and created 3 transform Field, All is working well
Here the Graph that I’m able to display

I have exported the data in Excel to show what I would like, the axis is the same but cost are based on Lines (right Axe) and each electric consumption is displayed with a separate bar (left Axe).

Hi @franckybel and welcome to the Grafana forum…

Looks like you are 90% there…In your panel settings, maybe try setting an override or two as shown in my mock up below?

Thanks @grant2 for your input

I think, I’m really near of the final solution :slight_smile:
I have one missing need, I would like to get one bar per field, like my Excel above.
Below the result of today, the bar graph of the 3 fields are all not well ‘separated’, I tried to use the propertie ‘bar alignment’ but too much overlap between the 3 bars, the visual is not good (not accurate about what I need as visual).

I’m pretty sure that I miss a stupied step to get what I need :wink:

I tried to recreate your data but cannot get the vertical bars to appear the same way. Instead, I see something like this:

Here is the same with Stacked:

I think this is because the test data which I am using has timestamps for each colored series that are exactly the same. For example, at exactly 08:35:30, there are 3 values recorded (represented by the green, yellow and blue).

Is there any possibility for you to standardize the time(s) at which each value is sampled?

For my report the time stamp is the same for the data because is a daily consumption and cost info
See below detailed table calculation extract from Data inspection of the query result.
The objectif is to get result of the consumption and to compare day by day the values (Like Excel Graph provided :wink: )
Unfortunately, I’m not autorized to upload the csv file, I have done a copy past from the CSV file if you want to use data

“Time”,“Heure Creuse”,“Heure Pleine”,“Total Conso”,“Heures Creuses €”,“Heures Pleines €”,“Total €”
2022-01-10 01:00:00,21.2 kWh,60.1 kWh,81.3 kWh,€2.88,€11.2,€14.1
2022-01-11 01:00:00,23.1 kWh,62.2 kWh,85.2 kWh,€3.14,€11.6,€14.7
2022-01-12 01:00:00,42.3 kWh,37.2 kWh,79.4 kWh,€5.76,€6.92,€12.7
2022-01-13 01:00:00,20.5 kWh,34.1 kWh,54.6 kWh,€2.79,€6.36,€9.15
2022-01-14 01:00:00,42.7 kWh,39.7 kWh,82.4 kWh,€5.81,€7.40,€13.2
2022-01-15 01:00:00,21.9 kWh,74.9 kWh,96.8 kWh,€2.98,€13.9,€16.9
2022-01-16 01:00:00,37.4 kWh,44.9 kWh,82.3 kWh,€5.09,€8.36,€13.4
2022-01-17 01:00:00,32.0 kWh,48.8 kWh,80.8 kWh,€4.35,€9.10,€13.4
2022-01-18 01:00:00,21.7 kWh,54.3 kWh,76.1 kWh,€2.96,€10.1,€13.1
2022-01-19 01:00:00,27.9 kWh,57.9 kWh,85.8 kWh,€3.79,€10.8,€14.6
2022-01-20 01:00:00,48.1 kWh,57.3 kWh,105 kWh,€6.55,€10.7,€17.2
2022-01-21 01:00:00,32.2 kWh,32.9 kWh,65.1 kWh,€4.38,€6.13,€10.5

How can we achieve this if the x-axis is a textual a,b,c kind of data and NOT time based?

Welcome @polavishnu to the Grafana forum.

Check this out: Grafana

Thanks @grant2
Was looking for a graph where bar graphs and line graph could be combined. Wanted to view in one panel the P90s, P50s and the avg values, but against a non time series list .

Can you create a mockup in Excel or whatever and share here, along with some sample data? I am not totally clear on what you are seeking.

hi- I also have the same question as polavishnu. How can you combine bars and lines in the same panel, in data that does not have a time series? A pareto chart for instance—

Pareto

The input data would look something like

Fault | Instances | Percent
X error | 10 | 50%
Y error | 6 | 30%
Z error | 4 | 20%

I see that there are plugins for paretos specifically but it doesn’t seem like you should need a plugin just for adding a line to a chart, and there are many other reasons to combine bars and lines besides paretos.

Check this plugin out