telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
466 stars 215 forks source link

[Chart] LegendMarkers configuration stopped working in the latest version #4241

Closed yanmariomenev closed 2 months ago

yanmariomenev commented 6 months ago

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

nstoychev commented 5 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

AaaStrky commented 4 months ago

Is this behavior expected? image

In the older version, I had the Chart Legend like this: image Now, if visible: true is added, it looks like this: image

yanmariomenev commented 2 months ago

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

https://www.telerik.com/kendo-angular-ui/components/charts/elements/legend/#toc-customizing-the-shape