Deneb bar chart X axis going awry

I created a bullet chart visual using Deneb. Had the help with a code and tutorial I found.

The one main issue I am having is that when I select a value form a slicer the values displayed go crazy in the visual based on the data.

No filter applied

With a filter applied

And I am attaching the code. I unfortunately can’t upload the pbix file due to the nature of the data.
Bullet Chart Spec Code.txt (4.3 KB)

I am hoping iit is just something simple with setting the x axis

As far as I can tell part of the issue is that I have the value label offset set to -10. If I don’t do this then actual value gets cluttered.

It also causes the bar chart area to overlay on part of the row Names on the left.

So I basically need to keep the row names fully visible. I need to have the Value indicate clearly, and this could be put somewhere else. Maybe offset 0 and then have the tick mark value offset below the line itself.

This could take care of everything except the fact that the plot area seems to run into the left column of names.

Update on this. I managed to figure out what was going on and corrected the issue. Everything Is displaying correctly now.

Hi @ToddFetcho. Glad you figured it out. Can you post a quick summary of what the issue was and how it was fixed (and perhaps the working JSON code, if different from your original post) for the forum members to reference in case of a similar situation? Was it the Deneb JSON code, the data model, or something else? Greg

There were a couple issues.

First in the config code I had to change the row padding to prevent the chart from over running onto the row labels

The second issue which was driving the problem was I had the Values field set with an xOffset of -10. Which displayed great on some data.

As soon as I selected a filter where the data range was say 0 - 10 instead of 0 - 75 the x-axis dynamically changed. But with the Values field set to an offset this made the x-axis go from -10 to 75 or higher to -10 to 10 or less. This shifted where the 0 point started in the visual.

By getting rid of the offset and having the value display on the left side of the bar and adjusting the tick value yOffset to read above the bar this cleaned up the x-axis and improved readability. Which is why I had originally set the x-offset.

Overall the person I was designing the report for was happy with the display

In my original post i added the original JSON file. I am enclosing the updated JSON file

Full Bullet Chart Code.txt (5.4 KB)

1 Like