Insert a calculated value into a classic chart

I’m trying to overlay a couple of different SQL query results into a classic chart and I’m not having any luck. I’ve got several hundred data points that I’m getting from an SQL query. The results display fine on the chart. I have a separate query that I’m using to calculate the average and standard deviation of those points. I’d like to plot those data points AND display the average as a line on the chart but the chart seems to be hung up on the average query not having a time value in the first column. The second dataset with the average causes an invalid chart configuration error. Does anyone have any idea how I can insert that average among the plotted data points?

You’ll need to use a range marker. There’s a number of posts here on the forum describing it.

The classic chart only allows custom properties that are datasets that comply with the requirements of the chart mode chosen. If you are providing an x-axis in one dataset, any other dataset will need an x-axis, too.

It took some fiddling but that worked. Thanks!

One more question for you: is there a quick way to add those range markers to the chart legend?

Not off the top of my head, no.

Customizing the legend is non-trivial:

1 Like