Jump to content
Software FX Community

Problem with Series Color - Using Javascript


Recommended Posts


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





  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;





  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.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...