This is a migrated thread and some comments may be shown as answers.

Pie chart is very small if chart widget is set to a smaller size

3 Answers 628 Views
Charts
This is a migrated thread and some comments may be shown as answers.
DMC Helpdesk
Top achievements
Rank 1
DMC Helpdesk asked on 16 Feb 2012, 10:49 AM
Hi,
I need my pie chart to be 200px * 200px, so I set the parent div style accrodingly, and appended the width style at the end of the chart function call.Now my chart widget size looks fine, but the pie chart itself is very small (diameter is only 26px) compared to the chart area.The pie chart looks like a small colored bullet point in the middle of a white space.How can I make the pie chart visual bigger ?


<div id="chart" style="width:200px">
</div>

function createChart2() {
                $("#chart").kendoChart({
                 
                    theme: $(document).data("kendoSkin") || "default",
                    dataSource: {
                        type: "odata",
                        transport: {
                            read: {
                                url: "../../Services/WcfDataService1.svc/AllianceSummaryPartnershipMixes"
                            }
                        },
                        sort: {
                            field: "Name",
                            dir: "asc"
                        }
                    },
                    title: {
                        text: "Partnership Mix"
                    },
                    legend: {
                        position: "bottom",
                        margin: 0
                    },
                    seriesDefaults: {
                        type: "pie"
                    },
                    series: [{
                        field: "Value",
                        categoryField: "Name"
                    }],
                    tooltip: {
                        visible: true,
                        format: "{0:N0}"
                    },
                    chartArea: { margin: 0 },
                    plotArea: { margin: 0 }
                }).css({ height: "200px"});
            }

3 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Germanov
Telerik team
answered on 17 Feb 2012, 04:37 PM
Hi DMC helpdesk,

Thank you for reporting this issue.

You can try to set padding of the pie chart:

series: [{
    field: "Value",
    categoryField: "Name",
    padding: 0
}]
We will fix this problem as soon as we can. 

I have update your telerik points.All the best,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
DMC Helpdesk
Top achievements
Rank 1
answered on 20 Feb 2012, 02:30 PM
It worked.Thanks.
0
Bjarke
Top achievements
Rank 1
answered on 05 Mar 2012, 11:48 AM
Sorry - a bummer. (Can I delete my thread post instead of just replacing the content?)
Tags
Charts
Asked by
DMC Helpdesk
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
DMC Helpdesk
Top achievements
Rank 1
Bjarke
Top achievements
Rank 1
Share this question
or