Steema Issues Database

Note: 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.



Bug 1645 - Upgrade TeeCHart Version 1.1 (old) to Latest TeeChart 4.1.2016.05125 error when try to view Pie Chart Vertical
Summary: Upgrade TeeCHart Version 1.1 (old) to Latest TeeChart 4.1.2016.05125 error wh...
Status: RESOLVED DUPLICATE of bug 1696
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: WebChart (show other bugs)
Version: TeeChart.NET 2014 4.1.2014.12154
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-05 22:48 EDT by Deepak Verma
Modified: 2016-12-01 05:50 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
screenshot (19.00 KB, image/png)
2016-10-06 06:24 EDT, christopher ireland
Details
result of code (10.64 KB, image/png)
2016-10-07 07:06 EDT, christopher ireland
Details
code (34.38 KB, image/png)
2016-10-07 07:07 EDT, christopher ireland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Verma 2016-10-05 22:48:07 EDT
Hi Team,
Our development team upgrading TeeChart Version 1.1 (old) to Latest TeeChart 4.1.2016.05125, showing error when try to view Pie Chart Vertical.

Other charts can view correctly but giving below error for Pie Chart Vertical:

"Object reference not set to an instance of an object"

This is very urgent for or development purpose and stuck to proceed with this issue.

Please help and suggest the required things for this.

Thanks
Deepak Verma
deepak.verma@exact.com
Comment 1 christopher ireland 2016-10-06 03:46:45 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.
Comment 2 Deepak Verma 2016-10-06 05:38:07 EDT
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
Comment 3 christopher ireland 2016-10-06 06:24:14 EDT
Created attachment 651 [details]
screenshot
Comment 4 christopher ireland 2016-10-06 06:25:56 EDT
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?
Comment 5 Deepak Verma 2016-10-06 12:07:47 EDT
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.
Comment 6 christopher ireland 2016-10-07 07:06:36 EDT
Created attachment 652 [details]
result of code
Comment 7 christopher ireland 2016-10-07 07:07:07 EDT
Created attachment 653 [details]
code
Comment 8 christopher ireland 2016-10-07 07:09:13 EDT
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.
Comment 9 Deepak Verma 2016-10-08 06:25:59 EDT
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
Comment 10 Deepak Verma 2016-11-25 02:34:58 EST
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.
Comment 11 christopher ireland 2016-12-01 05:50:07 EST

*** This bug has been marked as a duplicate of bug 1696 ***