Sign in to follow this  
iulian

Setadaptiveymin Not Working With Ranges

Recommended Posts

Hi,

 

I noticed an issue with charts when using setAdaptiveYMin="1" and ranges. For example, if I have two ranges, let's say low (0-60 colored red) and high (60-100 colored green), and the Y minimum calculated value is 50, then I only see the range named high (60-100, colored green). I expect to see the range named low from 50-60 (colored red) and the green one from 60-100 (colored green).

 

What do you recommend in this case?

 

Thank you,

Iulian

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

In what chart type you are facing this issue?

 

Please send us the chart XML and sample code to test at our end.

Share this post


Link to post
Share on other sites

Hi,

 

In what chart type you are facing this issue?

 

Please send us the chart XML and sample code to test at our end.

 

Hi,

 

I'm using a Column 2D. Here are the two XML strings that you can use to test this behavior.

 

setAdaptiveYMin="1" -- I cannot see "Average" trend

 

<chart xAxisName="Part Description" maxLabelWidthPercent="35" canvasTopMargin="1" labelDisplay="AUTO" aboutMenuItemLabel="About" setAdaptiveYMin="1" showBorder="0" aboutMenuItemLink="" formatNumberScale="1" bgColor="FFFFFF" chartTopMargin="5" canvasBorderColor="CCCCCC" paletteColors="4572A7,AA4643,89A54E,80699B,DB843D,7A1D20,80c0f0,00c090,e89f7b,c06090,3080a0" showShadow="0" numberScaleValue="1000,1000,1000" plotGradientColor="" yAxisName="On Time" numberScaleUnit="K,M,B" showValues="0" canvasBorderThickness="0" yAxisMaxValue="0.0" yAxisMaxValue="100.000001" ><set label="Part 1B" value="100.00" /><set label="Part 1C" value="90.77" /><trendLines><line endValue="90.0" isTrendZone="1" startValue="70.0" color="#FFFF00" displayValue="Average" valueOnRight="1" showOnTop="0" alpha="25"/><line endValue="100.0" isTrendZone="1" startValue="90.0" color="#00FF00" displayValue="Good" valueOnRight="1" showOnTop="0" alpha="25"/></trendLines><styles><definition><style name="PlotBevel" type="Bevel" distance="2"/><style name="divShadow" type="shadow" angle="45" distance="2" color="000000"/></definition><application><apply toObject="DataPlot" styles="PlotBevel"/><apply toObject="DIVLINES" styles="divShadow"/></application></styles></chart>

 

 

setAdaptiveYMin="0" -- I can see the "Average" trend

 

 

<chart xAxisName="Part Description" maxLabelWidthPercent="35" canvasTopMargin="1" labelDisplay="AUTO" aboutMenuItemLabel="About" setAdaptiveYMin="0" showBorder="0" aboutMenuItemLink="" formatNumberScale="1" bgColor="FFFFFF" chartTopMargin="5" canvasBorderColor="CCCCCC" paletteColors="4572A7,AA4643,89A54E,80699B,DB843D,7A1D20,80c0f0,00c090,e89f7b,c06090,3080a0" showShadow="0" numberScaleValue="1000,1000,1000" plotGradientColor="" yAxisName="On Time" numberScaleUnit="K,M,B" showValues="0" canvasBorderThickness="0" yAxisMaxValue="100.0" yAxisMaxValue="100.000001" ><set label="Part 1B" value="100.00" /><set label="Part 1C" value="90.77" /><trendLines><line endValue="90.0" isTrendZone="1" startValue="70.0" color="#FFFF00" displayValue="Average" valueOnRight="1" showOnTop="0" alpha="25"/><line endValue="100.0" isTrendZone="1" startValue="90.0" color="#00FF00" displayValue="Good" valueOnRight="1" showOnTop="0" alpha="25"/></trendLines><styles><definition><style name="PlotBevel" type="Bevel" distance="2"/><style name="divShadow" type="shadow" angle="45" distance="2" color="000000"/></definition><application><apply toObject="DataPlot" styles="PlotBevel"/><apply toObject="DIVLINES" styles="divShadow"/></application></styles></chart>

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

From the chart XML, you have specified yAxisMaxValue attributes 2 times.

 

You would have to specify it only for once. Also, set yAxisMinValue='50.00' to get the desired results.

 

setAdaptiveYMin attribute lets you set whether the y-axis lower limit will be 0 (in case of all positive values on chart) or should the y-axis lower limit adapt itself to a different figure based on values provided to the chart.

 

Ref. Code:

<chart ... yAxisMinValue='50.00' yAxisMaxValue='100.00' setAdaptiveYMin='1'>

 

Please find attached screen-shot for your reference.

post-24802-0-64731400-1342503343_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

From the chart XML, you have specified yAxisMaxValue attributes 2 times.

 

You would have to specify it only for once. Also, set yAxisMinValue='50.00' to get the desired results.

 

setAdaptiveYMin attribute lets you set whether the y-axis lower limit will be 0 (in case of all positive values on chart) or should the y-axis lower limit adapt itself to a different figure based on values provided to the chart.

 

Ref. Code:

<chart ... yAxisMinValue='50.00' yAxisMaxValue='100.00' setAdaptiveYMin='1'>

 

Please find attached screen-shot for your reference.

 

Thanks for the observation regarding yAxisMaxValue.

 

Setting the yAxisMinValue is not a solution because the data (values) and ranges are generated dynamic. So we may have 3 ranges, or 4, even starting from 0, and in this case setting the yAxisMinValue to 0 would cancel the effect of setAdaptiveYMin.

 

Basically, this is what I am expecting a chart with trendlines and setAdaptiveYMin="1" to work:

 

If min Y value is calculated to 50 and I have a range from 30 to 70, then I would still like to see that range, as much as possible (from 50 to 70 in this case).

 

I attached an image so it's easier to understand.

 

Iulian

post-27902-0-24404700-1342548780_thumb.png

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

The chart will display all the ranges(trendZones) depending upon the set values.

 

If you are providing set value as 140 and trendzone range is from 50 to 90 then the range will not be appeared on the chart.

 

If you want to display all the ranges on the chart then set element values should be in specified ranges.

 

You can also set the ranges (trendzones) dynamically.

 

Please find attached screen-shots for your reference.

post-24802-0-94367200-1342595909_thumb.png

post-24802-0-76025700-1342595921_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

The chart will display all the ranges(trendZones) depending upon the set values.

 

If you are providing set value as 140 and trendzone range is from 50 to 90 then the range will not be appeared on the chart.

 

If you want to display all the ranges on the chart then set element values should be in specified ranges.

 

You can also set the ranges (trendzones) dynamically.

 

Please find attached screen-shots for your reference.

 

I'm appreciate you're attention, but we're not on the same page, as the problem I'm writing you about is different:

 

If the auto calculated Y min value is 50 and I have a range starting from 20 to 70, then I would like to see the range for the remaining visible interval, which is from 50 to 70. And the problem is that this range (20-70) is not showing up for the remaining interval (50-70; interval 50 to 70 is inside 2- to 70).

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Since you are passing chart data dynamically. You would need to write your own logic to find the min value and set the range accordingly.

 

Chart will display all the trendZones when all the set elements and min value will fall in the specified range.

Share this post


Link to post
Share on other sites

Hi,

 

Since you are passing chart data dynamically. You would need to write your own logic to find the min value and set the range accordingly.

 

Chart will display all the trendZones when all the set elements and min value will fall in the specified range.

 

FusionCharts should do this calculation since it has all the data. The data from the server comes in XML and I use setXMLData(xmlData). Additional to this I have to send the values separate and make the calculations? Is there a way to get the values without parsing the XML or sending them from server in another way?

Edited by iulian

Share this post


Link to post
Share on other sites

Hi,

 

I am afraid, FusionCharts does not accept data in any other format except the supported XML or JSON data format t\o feed to the charts and display the same.

 

You would need to retrieve the data from the source and convert it to the FusionCharts supported data format to pass it to the chart.

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hi,

 

I am afraid, FusionCharts does not accept data in any other format except the supported XML or JSON data format t\o feed to the charts and display the same.

 

You would need to retrieve the data from the source and convert it to the FusionCharts supported data format to pass it to the chart.

 

Hope this helps. :)

 

Sanjukta,

 

It seems you do not understand what the problem is. FusionCharts calculates the minimum value and it should adapt the ranges so that if the minimum value visible on the chart is 50 and the lowest range is 30 to 80, the range should still be visible FROM 50 (the minimum value calculated by FusionCharts) TO 80. Let me know if it's clear for or else we can have a phone call or a quick online meeting session to help you understand the issue.

 

Regards,

Iulian

Share this post


Link to post
Share on other sites

Hi Iulian,

 

Apologies for the mis-communication.

 

Could you please confirm if you are willing to make the chart adjust the trend-zone with respect to the "yAxisMinValue" as and when changed due to "setAdaptiveYMin"?

 

We are depicting a scenario which we assume is what you are looking for. Please confirm with the same.

 

For example, your chart initially loads with a red trend-zone whose "startValue='20' " and "endValue='70' ". Now when the data changes, and "yAxisMinValue" becomes '50' from '20' due to "setAdaptiveYMin='1' ", you want the red trend-zone to be visible from '50' to '70'.

 

In case this is what you are looking for, I am afraid, FusionCharts currently does not support the same. However, we would make a note of this and shall update it in our wishlist for future upgrades.

 

Hope this helps. Awaiting your confirmation on this.

Share this post


Link to post
Share on other sites

I would just like to add my vote for this feature as well. I am beating my head against the wall with this exact issue. It's impossible to calculate the y min for the chart because FusionCharts does it adaptively (although if they provided the algo I could do the same).

 

The situation I have is I want a trendzone that colors in all of the chart up to some y number. However, my charts can have deep negative values. As such, even when I give my trendline a startValue of the lowest negative number there is still a fair amount of "buffer" space on the bottom of the chart that isn't filled in.

 

I've tried several formulas to always fill it in (i.e. lowest value * 2.5, lowest value * 2.33), but I inevitably find a chart where the adaptive range is different than this formula and I have unfilled space on the chart. Oh, and if you give your trendline/zone a value lower than the y min of the chart, the entire trendline doesn't show up. (My first thought was to set my startValue to -99999999999. On the flip side if you remove startValue from your trendline XML it just sets it to 0.)

Edited by mikeytag

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