Jump to content
Software FX Community

Y-axis


amankazi

Recommended Posts

 Can you please explain the working of Y axis in my scenario with the series?

 I am comparing it. How will I get the Index of the series to which the Y axis belongs to ? Here is the code snippet for it

AxisY temp_Y = (AxisY)e.Object;string SeriesName ; 

for(IntYAxisCount = 0; IntYAxisCount < chartHistoricGraph.AxesY.Count;IntYAxisCount++){  if(temp_Y.Equals(chartHistoricGraph.AxesY[intYAxisCount]))  {   SeriesName = chartHistoricGraph.Series[intYAxisCount].Text;   break;  }} 

Link to comment
Share on other sites

  • 3 weeks later...

Following is the code how I got the exact Y axis on which user has clicked.

int IntSeriesIndex = 0;

AxisY YAxisObject = (AxisY)e.Object;for (int IntYAxisCount = 0; IntYAxisCount < chartHistoricGraph.AxesY.Count; IntYAxisCount++)

{

if (YAxisObject.Equals(chartHistoricGraph.AxesY[intYAxisCount]))

{

string LegendName = chartHistoricGraph.AxesY[intYAxisCount].Title.ToString();for (int IntSeriesCount = 0; IntSeriesCount < chartHistoricGraph.Series.Count; IntSeriesCount++)

{

if (chartHistoricGraph.Series[intSeriesCount].Text == LegendName.ToString())

{

IntSeriesIndex = IntSeriesCount;

}

}

break;

}

}

 

I am facing one more issue, on change of the color of series, the dynamically added Yaxis color is not changing.

Link to comment
Share on other sites

User can change the color of the series by picking it from color pallet(User can right click on the series and change the color). To do this I am using the CommandID "29468", when user changes the color at runtime the color the Y axis should also change. But it is not changing, as I am using the predefined CommandID, I am not sure how I can change the color of the Y-axis at runtime.

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.

Guest
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...