Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • hi

                                    how change the legend text in a pie Chart?

                                    the serie is add in codebehind

                                    this is my code

                                    Dim series As New DevExpress.XtraCharts.Series
                                                series.ChangeView(DevExpress.XtraCharts.ViewType.Pie3D)
                                                series.Name = "Resumen"
                                                WebChartControl1.Series.Add(series)
                                                WebChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(0, totalGarantia))
                                                WebChartControl1.Series("Resumen").LegendPointOptions.PointView = DevExpress.XtraCharts.PointView.Values
                                                WebChartControl1.Series("Resumen").LegendText = "HH Garanti╠üa"
                                                WebChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(1, totalTrabajo))
                                                WebChartControl1.Series("Resumen").LegendPointOptions.PointView = DevExpress.XtraCharts.PointView.Values
                                                WebChartControl1.Series("Resumen").LegendText = "HH Trabajo"
                                                WebChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(2, totalImprevisto))
                                                WebChartControl1.Series("Resumen").LegendPointOptions.PointView = DevExpress.XtraCharts.PointView.Values
                                                WebChartControl1.Series("Resumen").LegendText = "HH Imprevistos"
                                                WebChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(3, totalMel))
                                                WebChartControl1.Series("Resumen").LegendPointOptions.PointView = DevExpress.XtraCharts.PointView.Values
                                                WebChartControl1.Series("Resumen").LegendText = "HH Motivos MEL"
                                                WebChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(4, totalSng))
                                                WebChartControl1.Series("Resumen").LegendPointOptions.PointView = DevExpress.XtraCharts.PointView.Values
                                                WebChartControl1.Series("Resumen").LegendText = "HH Motivos SNG"

                                    thanks

                                0

                                Hi Jorge,

                                To accomplish this task, you might need to handle the WebChartControl.CustomDrawSeriesPoint event and update the e.LegendText property. Please refer to the sample code snippet below:

                                [VB.NET]
                                Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim series As New DevExpress.XtraCharts.Series series.ChangeView(DevExpress.XtraCharts.ViewType.Pie3D) series.Name = "Resumen" Me.ChartControl1.Series.Clear() Me.ChartControl1.Series.Add(series) Me.ChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(0, 1)) Me.ChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(1, 2)) Me.ChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(2, 3)) Me.ChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(3, 4)) Me.ChartControl1.Series("Resumen").Points.Add(New DevExpress.XtraCharts.SeriesPoint(4, 5)) End Sub Private Sub ChartControl1_CustomDrawSeriesPoint(ByVal sender As System.Object, ByVal e As DevExpress.XtraCharts.CustomDrawSeriesPointEventArgs) Handles ChartControl1.CustomDrawSeriesPoint e.LegendText = e.SeriesPoint.Argument & "_test" End Sub

                                 
                                Thanks,
                                Alex

                                0

                                thanks the solution work now how i did to in the pie chart appairs porcentage instance decimal numbers?

                                0

                                i found the solution

                                WebChartControl1.Series("Resumen").PointOptions.ValueNumericOptions.Format = DevExpress.XtraCharts.NumericFormat.Percent

                                0

                                work

                                0

                                Hi Jorge,

                                Thanks for the update. Please feel free to contact us if you have any further difficulties. We will do our best to help you.

                                Thanks,
                                Alex

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners