XY Chart - bar category fixed axis range

Hi there,

We’re trying to accomplish something i initially thought would be quite easy, but is seemingly causing all sorts of headaches.
We want to create a bar chart with two data series:

  1. thickness - shows a count of how many items have the specified thickness. The thickness values could be anywhere between 10-100mm depending on results of a query.

  2. target - fixed overlay bar to show reference targets for thickness.
    The count value is immaterial, its fixed to just show a fixed height bar.

This currently produces a chart that looks like this:

xAxis render = category
yAxis render = value
both series render = column

The first issue seems to be that the X axis isn’t really a numeric scale like i would want. Ideally this would be ranged between 10-100mm (fixed), or could be set to auto range properly.
It also seems like each data series has its own scale for the X axis, as you can tell by looking at the raw data and seeing that not everything is showing up as expected.

It seems that i HAVE to use category render for this example as well. The following settings provide a numeric X axis that i’d want, but don’t really display the data properly.
Setting xAxis render = value
series render = line

The only way it seems possible to get the right result is if we pad both datasets with 0 count, and thickness values set to the range required. ie:


But this post processing script to add rows seems to bring perspective views to a crawl… As we need 1000 values to represent 10.0mm to 100.0mm in 0.1mm increments.
And 100 values for all the targets to represent 10-100mm in 1mm increments.

for point 2. i dont really get what you are trying here.
isnt that just a line going from 10 to 100? doesnt that just equal the x as?

By point 2, do you mean the Targets dataset where the count is all 10?
That is just to draw a vertical line over the top of the proper data.
Essentially it is supposed to be multiple target points of which we expect the data points to cluster around like a normal distribution

So the only problem is this?

is it the processing that takes long or the drawing of all these columns?
or do you just want to set the range?

I have clarified with my co-worker that it is not the post-processing transform script that is slowing down the View, but it seems to be the actual rendering of the XY Chart to draw the 1000 or so data points. Even though most of them are set to 0.

So i would like a way to be able to set the X Axis range without having to artificially add a bunch of 0 values to force the X Axis to work properly.

Just add two points on a separate plot: (0, 0) and (100, 0). You could set the line to transparent.

What do you mean by a separate plot? Do you mean a new datasource, then add another series component?


The problem is that a category X axis doesn’t interpolate between values…
For instance, i’ve just tried a different method where I tried adding the targets to a third column in the binThick data source. I’ve added target values at a thickness of 20, 40, and 60 as below:

These are plotted on the same X axis, but there is no linearity to the X axis, as you can see the three red targets do not line up with the X axis values:

This is by nature of Category axis. But i can’t seem to get the same configuration working for a Value axis: