KendoUI Donut Chart

0 Answers 46 Views
Charts
Eduardo
Top achievements
Rank 1
Eduardo asked on 08 Mar 2023, 11:40 PM | edited on 09 Mar 2023, 06:37 PM
I am creating the donut chart with two categories. When one of the values is zero the color set to that category shades the center of the chart. How can I prevent that?




                            $("#" + appendDiv + index).kendoChart({
                                    title: {
                                        position: "bottom",
                                        text: data[0].hospital + `\nPatients ${data[0].total}`,
                                    },
                                    legend: {
                                        position: "top",
                                        visible: false
                                    },
                                    dataSource: {
                                        data: data
                                    },
                                series: [{
                                    type: "donut",
                                    field: "value",
                                    categoryField: "name",
                                }],
                                    seriesDefaults: {
                                        labels: {
                                            template: "${ value }",
                                            position: "center",
                                            visible: true,
                                            background: "transparent",
                                            color: "white",
                                            font:"15px"
                                        }
                                    },
                                seriesColors: ["#46bf6f", "#229dff"],
                                    tooltip: {
                                        visible: true,
                                        template: "${ category } - ${ value }"
                                },
                            })
Georgi Denchev
Telerik team
commented on 14 Mar 2023, 10:42 AM

Hi, Eduardo,

May I ask you what version of Kendo UI are you using?

I've tested the Donut chart with two values - 0 and 100, however the center isn't being filled with the color of the 0 value.

https://dojo.telerik.com/@gdenchev/AxihUlOf 

I believe this problem might be related to a bug that has been previously fixed. Could you examine the Dojo and let me know in case I missed something in it?

Best Regards,

Georgi

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Eduardo
Top achievements
Rank 1
Share this question
or