Jump to content
Software FX Community

Problem with Series Color - Using Javascript


kalyan_nani

Recommended Posts

Hi,

My chart have 9 series.I am providing 9 radio buttons for each series.When ever user selects a particular radio button I am moving the relevant series to AxisY2. I am using Javascript to achieve this fumctionality.

when I move a series to new Y axis(AxisY2) I want keep the new Y axis value color as series color.

For example:

Assume user clicks on 1st series (it is color in RED). The values on new Y axis should be displayed in RED.

The following is the code:

function createNewYaxis()

{

var myChart = document.getElementById('Chart1');   ctrl="chknewY";

  var myForm = document.forms[0]; var chkARR = myForm.elements["New Y"]; // Radiobuttons list

 

for(i=0;i<chkARR.length;i++)

  {

 

  if(document.getElementById(ctrl + i).checked ==true)

{

 

  myChart.Chart.Series.Item(i).AxisY = myChart.Chart.AxisY2;

myChart.Chart.Series.Item(i).TextColor =  myChart.Chart.Series.Item(i).Color;

 

  }

else

  {

  myChart.Chart.Series.Item(i).AxisY = myChart.Chart.AxisY;

  }

}

 myChart.Chart.Series.Item(i).TextColor =  myChart.Chart.Series.Item(i).Color;

I am getting error when I include the above statement.

Regards,

Kalyan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...