Chart configured as XY plot, truncating X Axis Tick Labels on Right Margin

Vision 8.1.38

I have a chart configured as XY Chart. I use it to dynamically draw 2 point linear relationships adjusted by the operator. I've used this for a couple of years, and it works fine if the right most digit is 3 characters or less. But I have a new application where the upper range is 1000. No matter what I do, the number gets truncated. Font or number style has no affect. Stretching the chart also has no affect to the rightmost number.

Google search led me to Fusion Charts which must share the same widget, as the exact same problem was described and the developer said the number hides below the canvas in this case, and the only way to tease it out is to rotate the numbers, which isn't an option on the Axis properties. Evidently, expanding the white space beyond the chart isn't an option to show the number.

Is there any other property that would resolve this?

image

Is there a way that you could add one extra tick mark on X-Axis?
Like if max value of X-Axis is 1000 having 10 ticks from 100-1000. Can you have max value as 1100 instead? Max value of x axis will be added into min value of x axis

I don't think the chart allows you to specify # of tick marks. It auto adjusts based on width of chart, lower and upper bound values.

But I did overlook a property, "Vertical Tick labels", that rotates the numbers 90 degrees. Then they are not truncated.

Not ideal, but is better than the truncated values.

Ok that trick works.

What if you just add 1100 to your X-Axis data then? It seems to be auto scaling for X axis so it would work

No, it scales to the upper bound of the X-Axis property, not the dataset.

This is just the standard chart component correct?

Yes

I have a workaround, though it's not great. Haven't quite figured out how to force the ChartPanel to increase/decrease it's insets to make room.

However, what you can do, is create an additional dataset for the chart. It will not hold any data, it's only purpose is to give you a way to add an additional range axis on the right.

Create an additional y-axis. Set the following properties of the axis:
Axis Label: (Empty String)
Tick Label Color: Transparent
Tick Marks Visible: False
Axis Position: Bottom/Right

Then in the dataset properties set the Y-Axis of your new dataset to your new Y-Axis. This will have the effect of adding more space on the right side of the chart.

A pretty hacky solution, but it works.

That works, however the label must not be an empty string, but spaces. Pretty smart, however!

Interesting, all I did was delete the string in the label property.

Glad it's working for you.

1 Like