Legend symbols when PointsVisible false, Legend Title

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Greg9504
Posts: 38
Joined: Fri Dec 06, 2013 4:51 pm

Legend symbols when PointsVisible false, Legend Title

Post by Greg9504 » Mon May 12, 2014 3:22 pm

Hello,

Is there a way to get the series symbol to show up in the legend when the series PointsVisible property is set to false?

Background: As I've mentioned before I'm using SeriesEventMarker's so I can uniquely colour and size each individual point of a series. I set the series shape and event marker shape equal so that I get a legend. I also set the colours equal for cases where I do not wish to colour each point. I run into problems when I want to set a points event marker color to transparent (to signify that the point has no data for the colour attribute). If I have PointsVisible set to true then the point shows with the colour currently assigned to the series.

First here is a screen shot showing series colouring, point (event marker) colouring equal. In this case I am not colouring each point uniquely, instead falling back to the series colour. Here the legend shows the symbol and everything is fine.
LegendShowPointsTrue_NoPointColouring.jpg
LegendShowPointsTrue_NoPointColouring.jpg (176.98 KiB) Viewed 6111 times
Here is a screen shot showing how it looks with uniquely coloured points and PointsVisible false, note the Legend has no symbols shown for the series. But I get the proper transparency and colour for the point.
LegendShowPointsFalse.jpg
LegendShowPointsFalse.jpg (188.07 KiB) Viewed 6111 times
Here is a screen shot showing how it looks with uniquely coloured points and PointsVisible true, note there are symbols in the legend. But I get improper colouring of the points because the series "point" is showing behind the transparent event marker.
LegendShowPointsTrue.jpg
LegendShowPointsTrue.jpg (195.32 KiB) Viewed 6111 times
Finally is there any way to add a title to the legend? In the case of the above plot it would nice to have the legend with title "Well Unit name" as this is how the series shapes (symbols) are assigned.

Thanks
Greg.

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

Re: Legend symbols when PointsVisible false, Legend Title

Post by ArctionPasi » Mon May 12, 2014 4:39 pm

Modifying the symbols of legend box is not possible. They appear as defined in the PointStyle of the series. There might be a workaround though... Create an extra FreeformPointLineSeries that doesn't hold any data. Make its PointStyle appearance similar to overlaid FreeformPointLineSeries + SeriesEventMarker. Hide the original FreeFormPointLineSeries from the legend by setting series.Title.ShowInLegendBox = false. Then you should see the "combined" point style in the legendbox.


To show "Well Unit Name" as legendbox category title, set

Code: Select all

ViewXY.LegendBox.Categorization = YAxis;
ViewXY.YAxes[0].Title.Text = "Well Unit Name"; 
LightningChart Support Team, PT

Greg9504
Posts: 38
Joined: Fri Dec 06, 2013 4:51 pm

Re: Legend symbols when PointsVisible false, Legend Title

Post by Greg9504 » Mon May 12, 2014 6:27 pm

Thanks I will try the work around for showing the symbol in the legend.

Unfortunately the proposed work around for the legend title will not work as the Y axis title has no relation to the series symbols. While I would get the title in the legend, the Y axis title would no longer be correct.

Thanks
Greg

Post Reply