kalyan_nani Posted August 27, 2007 Report Share Posted August 27, 2007 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 More sharing options...
Frank Posted August 27, 2007 Report Share Posted August 27, 2007 The series attributes class doesn't have a Text color property. If you want to change the color of the secondary Y-Axis text then the code should be: myChart.Chart.AxisY2.TextColor = myChart.Chart.Series.Item(i).Color; Link to comment Share on other sites More sharing options...
kalyan_nani Posted August 27, 2007 Author Report Share Posted August 27, 2007 Hi Frank, Thanks for your quick reply. myChart.Chart.AxisY2.TextColor = myChart.Chart.Series.Item(i).Color; I have added the above line to my code but still I am getting the default color(black) on secondary Y-Axis. Regards, Kalyan.P Link to comment Share on other sites More sharing options...
kalyan_nani Posted August 27, 2007 Author Report Share Posted August 27, 2007 Hi Frank, I have added the above line but, I am getting " could not complete the operation due to error 80131509 " javascript error. Regards, Kalyan.P Link to comment Share on other sites More sharing options...
Frank Posted August 30, 2007 Report Share Posted August 30, 2007 It seems that IE (JavaScript) is having problems with properties of type System.Drawing.Color. I'll google around but there is not much we can do about it if this is an IE bug, you may need to do this server-side. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.