ViewXY: Legend Box Icons

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

ViewXY: Legend Box Icons

Post by Felix » Tue Aug 05, 2014 9:18 am

Hello Pasi,

how can I show in the Legend box listing the icons?

I tried it with the following settings.

Code: Select all

_chart.ViewXY.LegendBox.Position = LegendBoxPosition.TopLeft;
_chart.ViewXY.LegendBox.Offset.SetValues(75, 0);
_chart.ViewXY.LegendBox.Fill.Style = RectFillStyle.None;
_chart.ViewXY.LegendBox.BorderWidth = 0;
_chart.ViewXY.LegendBox.Shadow.Visible = false;
_chart.ViewXY.LegendBox.ShowCheckboxes = false;
_chart.ViewXY.LegendBox.ShowIcons = true;
_chart.ViewXY.LegendBox.Layout = LegendBoxLayout.HorizontalRowSpan;
_chart.ViewXY.LegendBox.MoveByMouse = false;
_chart.ViewXY.LegendBox.MouseHighlight = MouseOverHighlight.None;
_chart.ViewXY.LegendBox.HighlightSeriesOnTitle = false;
However, it now looks like this.
LineChart_LegendBoxIcon.PNG
LineChart_LegendBoxIcon.PNG (36.27 KiB) Viewed 28500 times
It should look like this.
Icons.PNG
Icons.PNG (997 Bytes) Viewed 28500 times

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ViewXY: Legend Box Icons

Post by ArctionPasi » Tue Aug 05, 2014 12:21 pm

If series.PointsVisible = true, it shows the series PointStyle icons. If PointsVisible = false, it shows just the line.

Are you using SeriesEventMarkers to show the points? If so, add 3 extra PointLineSeries objects, where you have PointsVisible = true, and putting same PointStyle there than in markers. Then you have 6 items in the legend. Remove the extra (line) items by setting their Title.ShowInLegendBox = false.
LightningChart Support Team, PT

Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Re: ViewXY: Legend Box Icons

Post by Felix » Tue Aug 12, 2014 11:30 am

Hi Pasi,

is there a possibility to hide the lines in the icons?
Icons.PNG
Icons.PNG (997 Bytes) Viewed 28438 times

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ViewXY: Legend Box Icons

Post by ArctionPasi » Tue Aug 12, 2014 11:46 am

for the series that represent the icons in the legend box set their series.LineVisible = false.
LightningChart Support Team, PT

Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Re: ViewXY: Legend Box Icons

Post by Felix » Tue Aug 12, 2014 12:26 pm

Hi Pasi,

the lines should be hidden only in the legend, not on the chart.

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ViewXY: Legend Box Icons

Post by ArctionPasi » Tue Aug 12, 2014 12:33 pm

Yes, exactly. You must have
A) different series objects for the chart data
B) different series objects for the legend symbols

for series of B, set LineVisible = false.
LightningChart Support Team, PT

User avatar
bcroteau
Posts: 7
Joined: Thu Oct 23, 2014 5:38 pm
Location: Canada

Re: ViewXY: Legend Box Icons

Post by bcroteau » Tue Nov 04, 2014 3:31 pm

Hi Pasi,

Using this technique where we have a set of "dummy" series added to the legend for the sole purpose of displaying the icon correctly we lose some other important aspects of the chart.

Most notably we lose the ability to automatically highlight the corresponding series on the chart when hovering over a legend entry.

Is there some other way to achieve this? For example I've attempted to handle the various MouseOver events on the LegendBox but can find no way to extract the series information from either the event nor the legend.

Any suggestions?

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ViewXY: Legend Box Icons

Post by ArctionPasi » Tue Nov 04, 2014 9:56 pm

There is SetHighlight method you can call for the actual series in the SeriesTitleMouseOverOn handler of your dummy series. And RemoveHighlight method to call in SeriesTitleMouseOverOff handler.

Ensure your are using 6.2.4, older had some problems in this regard. Also set LegendBox.MoveFromSeriesTitle = false.
LightningChart Support Team, PT

AxelDorian
Posts: 2
Joined: Sat Apr 22, 2017 11:06 am

Re: ViewXY: Legend Box Icons

Post by AxelDorian » Sat Apr 22, 2017 11:24 am

Hi, please I plot ViewXY Chart. My XAxis points range from with 100 till 2500. But after plotting my data, the Xaxis start by 0 and extrapolate values for points before 100. Please to do to solve this problem?
Please help me. I don't want that segment before my first triangle point. How Can I do? Would you mind help me? Find Herein the image.
regards,
Attachments
charts1.PNG
charts1.PNG (53.09 KiB) Viewed 17184 times

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

Re: ViewXY: Legend Box Icons

Post by ArctionKestutis » Mon Apr 24, 2017 8:59 am

Hi,

Under normal condition LightningChart don't make interpolation/extrapolation/downsampling/upsampling. If you see some extra lines/points it must be bug in your code or in our library.
However, your image looks peculiar. First, it show that you are running quite old version of LightningChart, but somehow still in trial mode. Second, as far s I could see, your 1st point coordinates {100,0}. That is, x values starts from 100.
If you still have a problem, please update to latest version of LightningChart and send/upload your script to Arction's support or forum.

P.S. Please, create new topic in the forum, if it is not relevant to any other question asked before.

All the best.