Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

phuelish
New Contributor III

Prevent gauge chart from rescaling

Hello,

I'm using a speedometer type gauge chart with a variable minimum and maximum value.  The maximum shows the results for the worst performer, the minimum shows the best performer, and the gauge needle indicates the error rate for the selected individual.

I've noticed that the internal scaling of the gauge will change depending on the number of characters in the min and max.  As an example, if the worst performer's error rate is 9.9%, the gauge display will be larger than if the worst performer's error rate is 10.1%. This is somewhat problematic both from a visual standpoint (since there are multiple gauges) and from a layout standpoint (since the gauge chart has text in it).

Is it possible to prevent this rescaling? Since it may be relevant, I do not have access to the backend, so can't make any changes within the code itself...only within the front end.

Thanks for any help or ideas,

Frank

2 Replies

Re: Prevent gauge chart from rescaling

I think you will need to fill this char to have always the same number of chars. You could try with a space as prefix or suffix and if this don't worked then the 0 - this should be possible with num and maybe with such a formatting:

num(YourExpression, '00.0')

An alternatively would be to use a dual-expressions like this:

dual(if(YourExpression < 0.1, '0' & YourExpression, YourExpression)

- Marcus

phuelish
New Contributor III

Re: Prevent gauge chart from rescaling

Thanks Marcus,

I figured there wasn't a way to set the internal margins; appreciate you confirming this for me.  I think I'll use a if statement to set the number of places after the decimal depending on the magnitude of the number...this should keep the same number of characters each time. I'm guessing it'll look something like this:

if(ExpressionValue >= 0.1, num(ExpressionValue, '00.0%'),num(ExpressionValue, '0.00%'))

Not sure if I'll also need to change to a mono-spaced font, as a 1 may take up less space than all of the other numbers.  I should probably also account for the rare instance where the gauge max is 100%.

Community Browser