ViewSmith and ViewXY LegendBox different behaviour

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

ViewSmith and ViewXY LegendBox different behaviour

Post by lokesh » Mon Apr 03, 2017 9:29 pm

Hi,
I have the following code for both the ViewXY and ViewSmith Legend box.

Code: Select all

            chart.ViewSmith.LegendBox.BorderColor = System.Drawing.Color.FromArgb(40, 255, 255, 255);
            chart.ViewSmith.LegendBox.Fill.BitmapSmoothing = BitmapSmoothing.None;
            chart.ViewSmith.LegendBox.Fill.Color = System.Drawing.Color.FromArgb(180, 30, 30, 33);
            chart.ViewSmith.LegendBox.Fill.GradientColor = System.Drawing.Color.FromArgb(180, 30, 30, 33);
            chart.ViewSmith.LegendBox.Fill.GradientFill = GradientFill.Solid;
            chart.ViewSmith.LegendBox.Fill.Style = RectFillStyle.ColorOnly;

            chart.ViewSmith.LegendBox.Layout = LegendBoxLayout.VerticalColumnSpan;
            chart.ViewSmith.LegendBox.Position = LegendBoxPosition.TopRight;
            chart.ViewSmith.LegendBox.UseSeriesTitlesColors = true;
            chart.ViewSmith.LegendBox.Offset.X = -75;
            chart.ViewSmith.LegendBox.Offset.Y = 30;
            chart.ViewSmith.LegendBox.ShowIcons = false;
            chart.ViewSmith.LegendBox.MouseHighlight = MouseOverHighlight.None;
            chart.ViewSmith.LegendBox.HighlightSeriesOnTitle = true;
Now, when I keep my mouse on top of the series title in ViewXY legend box, it highlights to Yellow. But when I keep my mouse on top of the series title in ViewSmith legend box, it doesn't change the color. Is there some other property in the ViewSmith legend box that I have to set, so just the title color in legend box changes to the highlighted color?

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: ViewSmith and ViewXY LegendBox different behaviour

Post by ArctionKestutis » Tue Apr 04, 2017 9:24 am

Hi Lokesh,

The main property, which controls highlighting is under Series.MouseHighlight. Make sure that it is enabled for corresponding series. The LegendBox's properties are more turned to that would happen in LegendBox area.

We are using White color as basis to calculate gradient toward current object’s color => that is going to be new HighlightColor. In addition, we are adding 2 px for line width. Therefore, it is not "highlights to Yellow" - mote towards white.
I tested on 7.2 and 8 versions, and everything seems to be working as intended.

All the best.

lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

Re: ViewSmith and ViewXY LegendBox different behaviour

Post by lokesh » Tue Apr 04, 2017 2:16 pm

Hi Dr.,
Thanks for the response.
I set the MouseHighlight to Simple for all series in both views. My title visibility is set to false for all series. I did not set the HighlightColor.

The following are my observations
Case 1: Mouse over s21 series in Legend box of XY View.
xyMouseOver.png
xyMouseOver.png (5.83 KiB) Viewed 7106 times
Case 2: Mouse over s21 series in Legend box of Smith View.
smithMouseOver.png
smithMouseOver.png (6.01 KiB) Viewed 7106 times
But, in both cases, if I keep my mouse on the series, then the title gets highlighted in the legend box. So basically, in smith view it works only one way.
I was wondering if I could get the same behaviour as XY (case 1) in Smith(case 2). Should I be setting some property in smith pointlineseries for this?

Thanks again.

Regards,
Lokesh

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: ViewSmith and ViewXY LegendBox different behaviour

Post by ArctionKestutis » Wed Apr 05, 2017 9:18 am

Hi Lokesh,

I may misread your question and was writing more about Line's highlighting in the chart, while you have been more interested in Series Title highlighting in the LegendBox. In any case I don't see any problem, at least in our examples (I double check that again). The default color of Series Title highlighting in the LegendBox is Yellow and you can change that with property LegendBox.HighlightSeriesTitleColor. The only way I can stop highlighting was by disabling LegendBox.MouseInteraction or LegendBox.HighlightSeriesOnTitle. For me everything in ViewXY and Smith chart's LegendBox behaves the same way, and it is not different in v8.0.2.1 or v7.2.1.1.
If our Demo's examples works on your machine as I described, when it something with your app settings. You can send your app for closer investigation to Arction's support account.

All the best,
Kestutis

lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

Re: ViewSmith and ViewXY LegendBox different behaviour

Post by lokesh » Wed Apr 05, 2017 1:22 pm

Hi Dr.,
Thank you for the response.

I tried debugging the code I posted initially and I observed that when I do the follow:

Code: Select all

         chart.ViewSmith.LegendBox.ShowIcons = false;
the behaviour of the legend box changes. I was able to observe the same on your demo application. Could you please check this again?
Sorry for the inconvenience caused.

Thanks again.

Regards,
Lokesh

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: ViewSmith and ViewXY LegendBox different behaviour

Post by ArctionKestutis » Wed Apr 05, 2017 1:45 pm

Hi Lokesh,

It is sad but true - ViewSmith.LegendBox.ShowIcons = false prevent highlighting in LegendBox (although it is still highlight in ViewXY). :(
The good news, that you found a workaround :D

All the best.

Post Reply