Closed yanmariomenev closed 2 months ago
This behavior is expected.
Since version v15.0.0, the Chart Legend renders the markers area
and the markers for each item. For chart types like column, bar, and pie the area is a square. The markers in the legend are not visible by default since there aren't any markers in the chart as well.
To change the markers visibility, set visible: true
.
Example: https://stackblitz.com/edit/angular-quora3-fsf3sn?file=src%2Fapp%2Fapp.component.ts
Is this behavior expected?
In the older version, I had the Chart Legend like this:
Now, if visible: true
is added, it looks like this:
Due to the planned changes to the legend, the rendering is expected, and this issue will be closed as invalid. If the developer wants to revert to the old rendering, custom visuals should be used. For example the pie chart legend now renders square and to revert back to lines the following demo shows a custom visual implementation of the legend:
https://stackblitz.com/edit/angular-dijtnd-weevvb?file=src%2Fapp%2Fapp.component.ts
Describe the bug Due to some changes in the Legend element, the LegendMarkers stopped working for chart types like column, bar, and pie. This doesn't seem to affect the line chart.
To Reproduce Demos: https://stackblitz.com/edit/angular-quora3?file=src%2Fapp%2Fapp.component.ts https://stackblitz.com/edit/angular-tdc6k5?file=src%2Fapp%2Fapp.component.ts
Additional context This might be coming from v15.0.0 as 14.3.0 is working as expected: https://stackblitz.com/edit/angular-yni72i-ddnqxm?file=src%2Fapp%2Fapp.component.ts