Munmun

Change of values in y axis

Recommended Posts

Dear FusionCharts Team, I have few queries related to mscolumn2d chart and msline chart.
1) I want to extend the y-axis limit range in both the multiseries chart and also have customised divisions like 1 then 1.5 , 2 then 2.5 , and so on. The range needs to be extended and subdivsion of lines should be 1 then 1.25 2 then 2.5 and so on , customize it.

2) currently i have y-axis values like 0 , 0.5 , 1 and 1.5 , 2 and so on but i need them as a percentage like 5%, 20% , 10%, 15%.  i am taking data from database.

3) Can we have dual y-axis in a multicolumn or multiseries chart , two sides of a graph. in the image attached for actual change% and for predicted change% we need dual y-axis , is it possible to get this.

4)Is there a possibility to use a magnifying point/highlight a point in the msline graph  at a certain point inside the graph.

 

kindly help me with these points and let me know if we you need any clarification on these.

 

 

 

 

bar.JPG

line.JPG

Share this post


Link to post
Share on other sites

Hi Munmun,

 

Please find the answers to your queries in the sequence asked :

1. FusionCharts internal algorithm sets a y-axis range(minimum and maximum) along with a good looking interval based on the provided plot values in the dataSource.
If you want to set your own range and interval, you can customize it by setting the configuration attributes explicitly.

For example - "yAxisMinValue": "0", "yAxisMaxValue": "3", "numDivLines": "5".
This will display the values on the y-axis as 0, 0.5, 1, 1.5, 2, 2.5, 3.
Sample fiddle : http://jsfiddle.net/d2femc6y/3/

For reference : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/div-lines-and-grids#customize-the-number-of-divisional-lines

Please note : If the data values exceeds 3, then the above configuration attributes need to be set accordingly to get an interval o f 0.5 on the y-axis.

2. You can set the prefix or suffix to the values displayed on the chart by setting the "numberPrefix" and "numberSuffix" attributes accordingly. Please refer to the documentation ink for reference : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/number-format#add-number-prefix-and-suffix

3. Yes, you can plot columns(series) on either of the y-axis in a dual y-axis combination chart(mscombidy2d). Sample fiddle : http://jsfiddle.net/rmL5w2cd/4/

Please note : if the data plots for both the axes are set as column, the secondary plots overlaps the primary plots
Reference documentation link : https://docs.fusioncharts.com/archive/3.13.0/upgrading/changed-behavior#secondary-data-plots-overlap-primary-data-plots-3

4. Yes, you could set the anchors at individual data objects to highlight a single point in a msline chart.
Sample fiddle : http://jsfiddle.net/fkv37jeh/1/

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Dear Akash and team ,

As suggested by you , in order to have a dual y-axis i have added the code . But I do not get the dual y-axis lines , somewhere I am going wrong, secondly i need the vline and trendline at a perticular position here in 20% i need a trendline, and i have written the code for that , still the trendline in column2d chart is not getting plotted. 

 

Kindly check my code. i have also attached my queries and the image output that i m getting currently in the zip file . kindly rectify me this is important and urgent.
my requirement is that i need trendline at 20% for the column2d chart and dual y-axis on both sides of the column2d chart. i have written the code for that.please check. your help would be appreciated.

 

trendlines_dualyaxis.zip

Share this post


Link to post
Share on other sites

Hi Munmun,

 

The sample code has the chart type as "mscolumn2d" which does not support dual y-axis. Please check the Point 3 of the previous response in details where it was mentioned that the dual y-axis feature is supported in dual y-axis combination chart(mscombidy2d). Also check the sample fiddle provided : https://jsfiddle.net/rmL5w2cd/4/

For further reference, check the documentation link : https://www.fusioncharts.com/dev/chart-guide/standard-charts/combination-charts#2d-dual-y-axis-combination-chart

Please note : if the data plots for both the axes are set as column, the secondary plots overlaps the primary plots
Reference documentation link : https://docs.fusioncharts.com/archive/3.13.0/upgrading/changed-behavior#secondary-data-plots-overlap-primary-data-plots-3

 

The components "vLine" and "trendline" are separate elements on the chart.

"vLine": The vertical separator lines by default do not appear, you need to set them in the "category" object array accordingly. Refer to the documentation for the details :
https://www.fusioncharts.com/dev/chart-guide/chart-configurations/vertical-lines

"trendline": These are horizontal reference lines on the chart to show a trend, limit, target or range for interpreting the data. They do not appear by default, you need to define the "trendlines" object array which is a part of the dataSource. It is set to a specific y-axis value as provided in the "startValue" attribute of the "line" object. Please reefer to the documentation for the trendline structure : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/trend-lines-and-zones

Also a sample fiddle for reference : http://jsfiddle.net/fusioncharts/0x1zrh55/

You need to generate the dataSource of the mscombidy2d chart in your JSP code accordingly for implementing vLine and trendline on the chart.

 

Thanks,

Akash.

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