darensanborn

Ability to set Multi-Axis line chart checkbox setting by default

Recommended Posts

I have created a multi-axis line chart very similar to the sample one found here:

 

 

 

http://www.fusioncharts.com/PowerCharts/Gallery/MALine1.html

 

 

 

Our customer has asked that we turn off one of the two axes when the page loads. They want it to look exactly the way it looks when the checkbox is turned off - the line is gone but the checkbox is still there for them to turn on if they want to view it.

 

 

 

In reading through the documentation, it appears that checkboxes are always turned on at page load.

 

 

 

It would be very helpful to be able to turn one of the axes off by default at page load.

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello,

 

 

 

Welcome!

 

 

 

This is not possible, in FusionCharts, as of now. :D

Share this post


Link to post
Share on other sites

Hi,

 

In Multi-axis Line chart, the lines are associated with their Legend.  Hence, if you do not want to show a particular line, then you need to set the visibility of that line to 0. When you do this, the line will not be shown on the chart when the chart is first loaded but you will be able to show the line when you click on its legend or its checkbox.

 

For setting the visibility of a line to 0, use :

 

<dataset .. visible='0' >

 

Hope this helps.

Share this post


Link to post
Share on other sites

Dear Haritha,

 

Thanks but still same issue.

I follow your instruction but still same.

 

please check code and image for the output..

 

//IE

strXML.Append("<dataset visible='0' seriesname='Target IOEE' renderAs='Line' >");

foreach (System.Data.DataRow orow in otbl_ie.Rows)

{

if (orow["YVal"].ToString() == null || orow["YVal"].ToString() == "")

strXML.Append("<set value='85'/>");

else

strXML.Append("<set value='" + orow["YVal"].ToString() + "'/>");

}

strXML.Append("</dataset>");

 

 

post-62374-0-34476300-1389918092_thumb.jpg

Share this post


Link to post
Share on other sites

Hi,

 

The above mentioned attribute "visible" works only with JavaScript charts and not with Flash charts. Hence, please try using JavaScript charts and check again.

 

To convert your existing Flash chart to JS chart, you may use chart alias name instead of Swf file name.

 

Eg.

 Literal1.Text = FusionCharts.RenderChart("StackedColumn2DLine", "", strXML.ToSrting(), "myNext", "600", "300", false, true);

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

Thank you so much .

 

Still problem.

 

My environment is c sharp and asp.net.

 

 

strXML.Append("<dataset seriesname='iOEE' showValues='1' visible='0' renderAs='Line' lineThickness='2'>");

foreach (System.Data.DataRow orow in otbl_ioee.Rows)

{

strXML.Append("<set value='" + orow["YVal"].ToString() + "'/>");

}

strXML.Append("</dataset>");

//IE

strXML.Append("<dataset seriesname='Target IOEE' visible='0' renderAs='Line' >");

foreach (System.Data.DataRow orow in otbl_ie.Rows)

{

if (orow["YVal"].ToString() == null || orow["YVal"].ToString() == "")

strXML.Append("<set value='85'/>");

else

strXML.Append("<set value='" + orow["YVal"].ToString() + "'/>");

}

strXML.Append("</dataset>");

 

 

and

render chart is

 

 

FusionCharts.SetRenderer("javascript");

 

// string tmp = FusionCharts.RenderChart("StackedColumn2DLine", "", strXML, chartId, chartWidth, chartHeight, false, false, false, null, "showAll", null);

string tmp = FusionCharts.RenderChart("StackedColumn2DLine", "", strXML.ToString(), chartId, chartWidth, chartHeight, false, true);

return tmp;

 

 

 

can you assist

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