We have requirement of grid data can represented in chart form, grid can have multiple pages, Chart shows legend for first first page, but next page, legend is blank, tried using "destroy" method on igDataChart & igChartLegend but no luck. Any idea how can I get this working?
Thanks
Hello,
To display a label as a percentage you would use the formatLabel property:
http://help.infragistics.com/jQuery/2014.2/ui.igPieChart#options:formatLabel
As it describes you would use context.percentValue to see the percentage value that is associated with the slice.
Hi,
Iam using pie chart with MVC in my application. Can you please tell me how to display labels with percentage in Pie Chart like we do with XamPieChart. Here is my code
@(Html
.Infragistics()
.PieChart(Model)
.ID("chart")
.Width("200px")
.Height("300px")
.ValueMemberPath(label => label.Points)
.LabelMemberPath(label => label.Year)
.LabelsPosition(LabelsPosition.BestFit)
.Brushes(new List<string> { "#ffd320", "#ff420e", "#004586", "#579c1b" })
.Legend(legend => legend.ID("legend").LegendType(LegendType.Item))
.DataBind()
.Render()
)
Here I want to display Points in percentage in Pie Chart slices.Points is a double variable.Thanks in advance
Thanks lot, that worked.
Hello annasaheb,
Thank you for your patience. I have done some further looking into this matter and have found how you can reuse the legend for multiple chats. To do this you will want to call destroy on the legend as well when changing chats. For example:
$("#legend").igChartLegend("destroy");
Please let me know if you have any questions concerning this matter.
Thank you for the update. I have done some looking into this matter and have created a sample based on the sample code you have provided. With the code you have provided I have been able to see this issue. I am currently looking further into this matter to see what may be causing this issue. This is taking longer than I originally thought, I will continue looking into this matter and will provide you a progress update by the end of the day Thursday.