User (Legacy) Posted August 16, 2005 Report Share Posted August 16, 2005 Hello, I use multiple y-axis which I assign to multiple series (so one y-axis can "contain" more than one serie). Now our customers do have some troubles with identifing which y-axis belongs to which serie (the default highlight method of an axis isn't sufficient enough for them). What I want to do is the following: change the color of the y-axis which the current highligted series belongs to, so that the color of the series correspond with the (temporary) color of the axis. But I can't find a method to find the assigned y-axis of the highlighted serie, isn't this possible or am I missing something? Best regards, Pieter Boeren Link to comment Share on other sites More sharing options...
Software FX Posted August 18, 2005 Report Share Posted August 18, 2005 This is possible although I have to admit it is not an scenario we tested or designed for. ChartFX has a Highlighted event and you will get the series/point being highlighted, note that other elements in the chart could be highlighted, e.g. Constant Lines so you have to make sure ChartFX is actually highlighting a series, also note that when returning to "normal" we do not send the series so you will have to cache the temporary axis object. // This member will cache the currently highlighted axis private Axis m_oldAxis; private void OnHighlighted(object sender, SoftwareFX.ChartFX.Base.HighlightEventArgs e) { if ((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.Series) != 0) { int seriesIndex = e.Series; SeriesAttributes series = chart1.Series[seriesIndex]; Axis axis = chart1.Axis[(int) series.YAxis]; if ((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.On) != 0) { axis.TextColor = series.Color; m_oldAxis = axis; } } else if (((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.On) == 0) && (m_oldAxis != null)) { m_oldAxis.TextColor = Color.Black; m_oldAxis = null; } } chart1.Highlighted += new SoftwareFX.ChartFX.Base.HighlightEventHandler(OnHighlighted); We have new features related to highlighting coming on our next version. We hope they will open even more advanced scenarios. Stay tuned. JC Software FX Support "Pieter Boeren" <pieter@growlab.nl> wrote in message news:tgkS7wloFHA.1992@webserver3.softwarefx.com... > Hello, > > I use multiple y-axis which I assign to multiple series (so one y-axis can > "contain" more than one serie). Now our customers do have some troubles with > identifing which y-axis belongs to which serie (the default highlight method > of an axis isn't sufficient enough for them). > > What I want to do is the following: change the color of the y-axis which the > current highligted series belongs to, so that the color of the series > correspond with the (temporary) color of the axis. But I can't find a method > to find the assigned y-axis of the highlighted serie, isn't this possible or > am I missing something? > > Best regards, Pieter Boeren > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 19, 2005 Author Report Share Posted August 19, 2005 Many thanks, works perfectly! "Software FX Support" <none@noreply.com> wrote in message news:25IWmpEpFHA.1992@webserver3.softwarefx.com... This is possible although I have to admit it is not an scenario we tested or designed for. ChartFX has a Highlighted event and you will get the series/point being highlighted, note that other elements in the chart could be highlighted, e.g. Constant Lines so you have to make sure ChartFX is actually highlighting a series, also note that when returning to "normal" we do not send the series so you will have to cache the temporary axis object. // This member will cache the currently highlighted axis private Axis m_oldAxis; private void OnHighlighted(object sender, SoftwareFX.ChartFX.Base.HighlightEventArgs e) { if ((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.Series) != 0) { int seriesIndex = e.Series; SeriesAttributes series = chart1.Series[seriesIndex]; Axis axis = chart1.Axis[(int) series.YAxis]; if ((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.On) != 0) { axis.TextColor = series.Color; m_oldAxis = axis; } } else if (((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.On) == 0) && (m_oldAxis != null)) { m_oldAxis.TextColor = Color.Black; m_oldAxis = null; } } chart1.Highlighted += new SoftwareFX.ChartFX.Base.HighlightEventHandler(OnHighlighted); We have new features related to highlighting coming on our next version. We hope they will open even more advanced scenarios. Stay tuned. JC Software FX Support "Pieter Boeren" <pieter@growlab.nl> wrote in message news:tgkS7wloFHA.1992@webserver3.softwarefx.com... > Hello, > > I use multiple y-axis which I assign to multiple series (so one y-axis can > "contain" more than one serie). Now our customers do have some troubles with > identifing which y-axis belongs to which serie (the default highlight method > of an axis isn't sufficient enough for them). > > What I want to do is the following: change the color of the y-axis which the > current highligted series belongs to, so that the color of the series > correspond with the (temporary) color of the axis. But I can't find a method > to find the assigned y-axis of the highlighted serie, isn't this possible or > am I missing something? > > Best regards, Pieter Boeren > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.