Sign in to follow this  
John

Sparkline - incorrect scale with target line?

Recommended Posts

I am generating a sparkline with a target line. The target line represents a limit that the values are not supposed to breach. It's fine if any of the values "cross" the target line, but if not - as below - the scale for the chart is not automatically chosen to show the target line...

 

 

 

I think I can workaround by checking for the largest value and setting yAxisMaxValue...

 

 

 

Bug?

 

 

 

Thanks

 

 

 

John

Edited by Guest

Share this post


Link to post
Share on other sites

The limits for a chart are calculated based on its values, as the values are predominant figures of the chart.

 

 

 

If you've a trendline which is bigger than any value, you can just set [chart yAxisMaxValue=value of trendline].

 

 

 

In this case, the trendline always shows up, irrespective of any value. And, if the value is greater than the y-axis max value, the axis limit is automatically adjusted to a new value.

Share this post


Link to post
Share on other sites

OK - I'll do that.

 

 

 

Just thought that a trendline ought to be taken into account when auto-setting the axis values.

 

 

 

As you say I can easily loop through the data and check myself...

 

 

 

Thanks

 

 

 

John

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this