Sign in to follow this  
zsolt.pasztor

Trendline end value greater than y axis max value problem

Recommended Posts

We have a problem with trendlines.

 

When you use a trendline as a zone and trendline bigger than the chart (the start or the end value out of the range) the trendline won't be displaying.

In that case the visible part of to trendline has to be showing in the chart.

 

Is there a solution for this (bug fix, extension etc)?

 

Thanks for your answer.

 

ZsP

Share this post


Link to post
Share on other sites

Hi,

 

Try setting the Y axis max value in accordance to the end value given to the trendline using "yaxismaxvalue" attribute in the chart element.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for your answer. 

The problem is if the trendline end value too big and the data in the chart are too small those won't be readable properly (e.g. an end value of a trendline is 500, and the filtered data what i want to see between 0.0 - 1.9).

So the best solution is if we set the trendlines to y axis. Is there a javascript/jquery function or an other way?

Share this post


Link to post
Share on other sites

Hi,

 

No, when the trendline is overflowing (at the start or/and at the end), i still like to display it (right now the trendline zone disappearing in that case).

So I like to set the trendline min or max value to the y axis if overflowing.

There are two options I think:

- if i know how the fusion chart calculate the y axis min and max, than i can calculate it before the loading of the chart

- if there is a function which get back the y axis min and max, then I can change the trendline zone after the loading of the chart

 

 

thx

Share this post


Link to post
Share on other sites

Hi,

 

- if i know how the fusion chart calculate the y axis min and max, than i can calculate it before the loading of the chart

>> Y axis min and max values depends on the values being plotted. FusionCharts will decide Y axis max value based on the maximum value provided to the data plot.

Else, "yaxismaxValue" attribute defined in the chart element will decide the max value.

 

- if there is a function which get back the y axis min and max, then I can change the trendline zone after the loading of the chart

>>Using getChartAttribute("yaxismaxvalue"), you can fetch value of chart attributes explicitly applied to the root chart object (or the <chart> node element).

 

Docs link: http://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-methods.html#getChartAttribute

Share this post


Link to post
Share on other sites

Hi,

 

the chart y axis always greater than the maximum value of the elements, but i don't now how it's calculated by your system (maybe a rounded value, or just added a few percent extra ?)

the getChartAttribute get back a usable value when i predefined the 'yaxismaxvalue' first otherwise it's 'undefinied'.

Share this post


Link to post
Share on other sites

Hi,

 

Yes, it has been rounded off to the greatest of the dataset values, this will help charts to have better visualizations.

 

getChartattribute will returned undefined, if value is not predefined. You can set predefined value and later modify based on trendzone value.

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