FSharp.Charting icon indicating copy to clipboard operation
FSharp.Charting copied to clipboard

Legend in case of using Name property

Open FoggyFinder opened this issue 7 years ago • 2 comments

From documentation:

A legend is added automatically when names are used for data sets.

That's incorrect right now.

Probably because

let hasLegend = not (String.IsNullOrEmpty series.Name) || LegendEnabled.IsSome

series.Name is empty since #21

FoggyFinder avatar Nov 25 '18 17:11 FoggyFinder

https://github.com/fslaborg/FSharp.Charting/commit/dce9fecb8cdec724a768f7d1577769929f75cb60

does this check-in fix this issue?

voronoipotato avatar Jun 24 '19 03:06 voronoipotato

@voronoipotato no.

Probably I wasn't clear enough.

https://github.com/fslaborg/FSharp.Charting/pull/22/commits/96e4f6c2ba4ced7ce4b11c8e7e671aa9854e644a

Name was set to a Chart, but legend's visibility still depends on name of a series.

let hasLegend = not (String.IsNullOrEmpty series.Name) || LegendEnabled.IsSome

So, I see two options here:

  1. Documentation is wrong
  2. hasLegend should check ch.Name instead of series.Name.

FoggyFinder avatar Jun 25 '19 07:06 FoggyFinder