![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | Upgrade TeeCHart Version 1.1 (old) to Latest TeeChart 4.1.2016.05125 error when try to view Pie Chart Vertical | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | Deepak Verma <deepak.verma> |
| Component: | WebChart | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | critical | CC: | chris |
| Priority: | --- | ||
| Version: | TeeChart.NET 2014 4.1.2014.12154 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: |
screenshot
result of code code |
||
|
Description
Deepak Verma
2016-10-05 22:48:07 EDT
Hello Deepak, Could you please send us a Minimal, Complete, and Verifiable example (specified here: http://stackoverflow.com/help/mcve ) with which we can reproduce your issue? Some screenshots of what you are expecting to see would also be appreciated. Thank you. Hello Christopher, Thank you for your response, please find sample code which we are using for our Pie Charts, please note this is working correctly with TeeChart dll 1.1, but with latest DLL, this throwing error at line "chart.Series.Add(pie)" . Dim chart As Chart = New Chart With chart .Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None .Panel.Bevel.ColorTwo = System.Drawing.Color.White .Panel.Bevel.Width = 0 .Panel.Color = System.Drawing.Color.White .Panel.Brush.Color = System.Drawing.Color.White .Width = width .Height = height .Header.Visible = False .Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality .Panel.MarginBottom = 0 .Panel.MarginLeft = 0 .Panel.MarginRight = 0 .Panel.MarginTop = 0 .Aspect.View3D = False End With Dim bottomAxis As Steema.TeeChart.Axis = chart.Axes.Bottom bottomAxis.Labels.Separation = 0 bottomAxis.Labels.MultiLine = True bottomAxis.MinorTicks.Visible = True chart.Legend.Visible = Not (legendMode = ChartLegend.None) Dim pie As Steema.TeeChart.Styles.Pie = New Steema.TeeChart.Styles.Pie pie.Marks.Style = Styles.MarksStyles.LabelPercent pie.Circled = True For i As Integer = 0 To Me.items.HorizontalItemCount - 1 Dim hItem As MyItem = Me.items.HorizontalItem(i) ' Our code for getting values, for your testing you can add ardcoded values pie.Add(hItem.Total.First, hItem.description, DefaultColor.GetColor(i)) Next If Me.items.showHorizontalOther Then Dim otherTotal As AnalysisValues = CreateMyValues() ' Our code for getting values, for your testing you can add ardcoded values For i As Integer = 0 To Me.items.VerticalItemCount - 1 Dim vItem As MyItem = Me.items.VerticalItem(i) otherTotal.Add(vItem.Other) Next If Me.items.showVerticalOther Then otherTotal.Add(Me.items.otherOther) End If pie.Add(otherTotal.First, termOther, DefaultColor.GetColor(Me.items.HorizontalItemCount)) End If chart.Series.Add(pie) ' This Line throwing Object reference error to us, This was working correctly with old version 1.1 Created attachment 651 [details]
screenshot
Hello -
Using a Windows Form with a TChart added at desigtime, and exactly this code:
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
InitializeChart()
End Sub
Sub InitializeChart()
Dim chart As Chart = New Chart
With chart
.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
.Panel.Bevel.ColorTwo = System.Drawing.Color.White
.Panel.Bevel.Width = 0
.Panel.Color = System.Drawing.Color.White
.Panel.Brush.Color = System.Drawing.Color.White
.Width = Width
.Height = Height
.Header.Visible = False
.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
.Panel.MarginBottom = 0
.Panel.MarginLeft = 0
.Panel.MarginRight = 0
.Panel.MarginTop = 0
.Aspect.View3D = False
End With
Dim bottomAxis As Steema.TeeChart.Axis = chart.Axes.Bottom
bottomAxis.Labels.Separation = 0
bottomAxis.Labels.MultiLine = True
bottomAxis.MinorTicks.Visible = True
Dim pie As Steema.TeeChart.Styles.Pie = New Steema.TeeChart.Styles.Pie
pie.Marks.Style = Styles.MarksStyles.LabelPercent
pie.Circled = True
pie.FillSampleValues()
chart.Series.Add(pie)
TChart1.Chart = chart
End Sub
I get a chart identical to the screenshot attached. In your Web Form, how are you assigning the chart variable to the WebChart, exactly?
Hello, I have tried with your code as well, but still same error at line chart.Series.Add(pie) I am using this code for webform, not window, is this correct for web as well. Created attachment 652 [details]
result of code
Created attachment 653 [details]
code
Hello, In the attachment "code" you will see the code I have used in a Web Form project. In the attachment "result of code" you will see the result of running this code. No errors were thrown when running this code, and the result is as expected. My question is: how do you connect up the code in this test to the WebChart which is on the Web Form? Without any connection, as in this code, the result is an empty WebChart. Thank You Christopher, I am checking this code and let you know if this works fine for me as well. I will our existing implementation which was fine for old version and compare with new version. Thanks You Hi Christopher, Sorry to get back after long time. Now We are implementing/upgrading new teechart DLL and getting this error while debug. at Steema.TeeChart.Styles.Series.GetLanguageSpecificTitle() at Steema.TeeChart.Styles.Series.Added() at Steema.TeeChart.Styles.SeriesCollection.Add(Series s) Please suggest the reason and what need to do to fix this. *** This bug has been marked as a duplicate of bug 1696 *** |