Button set y-axis max

Hi,

I have a chart which shows the login performance of a citrix farm in realtime. Each point represents the logintime when a user logs in. In some cases there are very slow logins which results in very high values. As a result of this the y-axis max-value changes to this high value and most of the datapoints in the chart are “compressed” to a small range on the bottom :sweat_smile:
That´s ok and I don´t want to set a custom max value to the y-axis.
But I would give the users the ability to change the y-axis max-value to a fixed value, let´s say 100. Can I do this with a button and a script behind it?

Helge

We run into this outlier situation quite often and employ 1 of 3 solutions:

  1. Logarithmic Axis.
  2. Bucketing values, with the final bucket being open-ended.
  3. Using a custom maximum axis value and allowing the outlier values to max out. I know you don’t want to do this, but we’ve found that if you structure the tooltip to give the full details, users don’t seem to mind.

We haven’t attempted to manipulate the axis value through script because we prefer to reduce the number of actions a user must take to properly interpret a visual, but we script so much that if you don’t like any of the above solutions and still want to attempt it, I can take a whack at it, if you like, as it should only take me 5 minutes or less to determine if it can be done without contacting Dundas support.

Hi Helge,

You can certainly have standard users manipulate the axis via script and have that triggered by the user on a button click or using other actions such as value changed for a slider. An example for such script is detailed below but please keep in mind that there are at least two other options using the built-in interactivity that you may want to consider as those don’t require any script:

  1. Zoom – Users can always select a set of data points on the chart and zoom in and out of those using the context menu. Note that with this option you will get a scrollbar on the axis and users will also benefit from the option to focus on the data points of interest along the bottom axis as well (vs. always looking at the entire range).

  2. Visual Filter or Numeric filter – Users can simply select the outliers they want to filter out, open the context menu and choose Filter à Exclude Selected. This will filter out the outliers and will also modify any derived calculation (i.e. average or trend) to compute solely using the remaining data points. Note it will be similar to exposing a range number filter and connect it to your measure.

If you rather use a script – here are some sample steps for a script that will allow the users to manipulate the axis using a slider:

  1. Add a slider component to your dashboard.
  2. Add the following script to the dashboard “Ready” action (note you may need to adjust the script to use right chart and slider script names).

// set the maximum of the slider to the maximum value of your chart y axis and move the slider to that value

slider1.control.valueMax = chart1.control.yAxis.actualMaximum;

slider1.control.valueFirst = chart1.control.yAxis.actualMaximum;

  1. Add the following script to the “Changed” action of your slider.

chart1.control.yAxis.autoMaximumUpperLimit = slider1.control.valueFirst;

The end result should look similar to this:
image

A couple of notes to add:

  • The slider values is set upon the initial dashboard load but if you have a set of filters the user can use to filter the chart, you should place the script under step #2 in the chart “Data Changed” action as well so the slider resets every time with the new axis values that correspond to the new filter values.
  • The slider has a value step property which is by default set to 1. You may want to change that if you want the user to be able to change the values in bigger increments.

Let me know if that helps.

Great explanation. Maybe should add to Tips & Tricks?

will do - I actually thought we already have a tip about those but can’t seem to find it now so we will make sure to add it soon.

Thank you Wayne and Vidur Brij Khanna for taking the time to answer me in such a detailed level!!
There was a couple of good ideas. I have chosen the slider version and this works perfect for me.
It was perfect described.
Thank´s again for your support!

image

image

Hi Helge,

I am glad the description was helpful.You are most welcome.

Vidur