Page 1 of 1

ViewXY: Legend Box Icons

Posted: Tue Aug 05, 2014 9:18 am
by Felix
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 31832 times
It should look like this.
Icons.PNG
Icons.PNG (997 Bytes) Viewed 31832 times

Re: ViewXY: Legend Box Icons

Posted: Tue Aug 05, 2014 12:21 pm
by ArctionPasi
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.

Re: ViewXY: Legend Box Icons

Posted: Tue Aug 12, 2014 11:30 am
by Felix
Hi Pasi,

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

Re: ViewXY: Legend Box Icons

Posted: Tue Aug 12, 2014 11:46 am
by ArctionPasi
for the series that represent the icons in the legend box set their series.LineVisible = false.

Re: ViewXY: Legend Box Icons

Posted: Tue Aug 12, 2014 12:26 pm
by Felix
Hi Pasi,

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

Re: ViewXY: Legend Box Icons

Posted: Tue Aug 12, 2014 12:33 pm
by ArctionPasi
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.

Re: ViewXY: Legend Box Icons

Posted: Tue Nov 04, 2014 3:31 pm
by bcroteau
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?

Re: ViewXY: Legend Box Icons

Posted: Tue Nov 04, 2014 9:56 pm
by ArctionPasi
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.

Re: ViewXY: Legend Box Icons

Posted: Sat Apr 22, 2017 11:24 am
by AxelDorian
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,

Re: ViewXY: Legend Box Icons

Posted: Mon Apr 24, 2017 8:59 am
by ArctionKestutis
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.