![]() | 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 RTE with Pie Chart Vertical | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | Deepak Verma <deepak.verma> |
| Component: | WebChart | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | chris, sandra |
| Priority: | High | ||
| Version: | TeeChart.NET 2014 4.1.2014.02060 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: |
screenshot
.Net 1.1 DLL TChart display .Net 4.5 DLL TChart display ScreenShot Updated chart implemented your code you code implemented in sample Web app ScreenShot Screenshot with steema web app and Christopher suggested code PieChart Sandra results ScreenSHot-GradientIssue Bar chart border issue screenshot |
||
|
Description
Deepak Verma
2016-11-25 05:25:18 EST
Hello Deepak, Again, 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? Without such a MCVE I am unable to reproduce your problem, and so am unable to fix it for you. Thank you. Hello Christopher, 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)". Also if I use sample code given by you for Bug 1645, this works fine, but if I just Update dll from 1.1 to new dll with same implementation, this throw error 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() 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) After this line, below error at Steema.TeeChart.Styles.Series.GetLanguageSpecificTitle() at Steema.TeeChart.Styles.Series.Added() at Steema.TeeChart.Styles.SeriesCollection.Add(Series s) Please suggest fix for this issue. Also this is critical for us now, and stopping our developer to proceed with latest DLL, SO please make this critical pririty for us now. Thanks Created attachment 667 [details]
screenshot
Using the following code in a Windows Form application with the release version of TeeChart.dll v.4.1.2016.10262 for x86:
public enum ChartLegend
{
None,
Visible
}
private void InitializeChart()
{
int width = 600, height = 400;
ChartLegend legendMode = ChartLegend.None;
Chart chart = new Chart();
chart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
chart.Panel.Bevel.ColorTwo = System.Drawing.Color.White;
chart.Panel.Bevel.Width = 0;
chart.Panel.Color = System.Drawing.Color.White;
chart.Panel.Brush.Color = System.Drawing.Color.White;
chart.Width = width;
chart.Height = height;
chart.Header.Visible = false;
chart.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
chart.Panel.MarginBottom = 0;
chart.Panel.MarginLeft = 0;
chart.Panel.MarginRight = 0;
chart.Panel.MarginTop = 0;
chart.Aspect.View3D = false;
Axis bottomAxis = chart.Axes.Bottom;
bottomAxis.Labels.Separation = 0;
bottomAxis.Labels.MultiLine = true;
bottomAxis.MinorTicks.Visible = true;
chart.Legend.Visible = legendMode != ChartLegend.None;
Pie pie = new Pie();
pie.Marks.Style = MarksStyles.LabelPercent;
pie.Circled = true;
for (int i = 0; i < 5; i++)
{
pie.Add(i, "Label", Color.Red);
}
chart.Series.Add(pie);
tChart1.Chart = chart;
}
I get the screenshot attached. That is to say that I am unable to reproduce your issue using the code you sent, I'm afraid.
*** Bug 1644 has been marked as a duplicate of this bug. *** *** Bug 1645 has been marked as a duplicate of this bug. *** Hello Christopher, If I used your code with windows form or with new web form, I am able to load chart but with existing implementation for web form and DLL 1.1 to upgrade latest version throw this error. Steema.TeeChart.Styles.Series.GetLanguageSpecificTitle() As Steema mentioned about backward compatibility, so with existing implementation should work with latest dll as well. Do you have any Idea what this method do and any alternative for fix this issue. Thanks in advance. Hello Deepak - Is there any way you can send us some code with which we can reproduce your problem? I'm sure you understand that without being able to reproduce your problem here it is very difficult for us to correct it. Thank you, Christopher. Hi Christopher, After trying different solution I have managed to get the reason for the issue. We are getting error due to missing Pie Title, which seems now is mandatory, but in 1.1 this was not mandatory SO I have added below line to my code, which has been fix the issue pie.Title = " " Now I am able to see the charts correctly but another help needed now from your side, New charts now having border and background color to chart panel (Screenshot Attached), could you please help/suggest how to remove these border and background, so that new charts looks similar to old one. Thanks in advance. Created attachment 669 [details]
.Net 1.1 DLL TChart display
Created attachment 670 [details]
.Net 4.5 DLL TChart display
Created attachment 671 [details]
ScreenShot
Using the following code:
private void InitializeChart()
{
tChart1.CurrentTheme = ThemeType.TeeChart;
tChart1.Aspect.View3D = false;
Pie pie = new Pie(tChart1.Chart);
pie.FillSampleValues();
tChart1.Panel.Gradient.Visible = false;
tChart1.Panel.Color = Color.White;
tChart1.Panel.Bevel.Inner = BevelStyles.None;
tChart1.Panel.Bevel.Outer = BevelStyles.None;
}
gives me the chart you can see in the attached screenshot.
Hi Christopher, Thank you very much for this code, Now background color has been removed correctly. But Outer border still not removed (see attached Image Latest). Please Suggest to fix this issue as well, how to remove border. Also I am using web charts, I tried your code with webchart sample application Which Steema provides, with this code border not removed. Also tChart1.CurrentTheme = ThemeType.TeeChart; not working for webchart. Created attachment 672 [details]
Updated chart implemented your code
Created attachment 673 [details]
you code implemented in sample Web app
Created attachment 674 [details]
ScreenShot
Hello,
The attachment is a screenshot of the same code in a Web Form.
Hello Christopher, I am not sure what is the reason, I have also tried your code with Steema provided .net website example application (downloaded from Steema website) with charts style Standard and page piechart.aspx, But result is border coming outside to charts, please check and replicate this or help to fix this
You can get code to replicate this from Steema example installed application path:
<WINDIR>:\\Steema Software\Steema TeeChart for .NET 2015 Evaluation 4.1.2015.12166\Examples\TeeChartForNET\Chart Styles\Standard\ PieChart.aspx
Code for pieChart.aspx.cs page is:
public partial class PieChart : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
//WebChart1.Chart.Panel.BorderRound = 30;
Steema.TeeChart.Chart ch1=WebChart1.Chart;
ch1.Series.RemoveAllSeries();
ch1.Series.Add(new Steema.TeeChart.Styles.Pie());
Steema.TeeChart.Styles.Pie pie = (ch1.Series[0] as Steema.TeeChart.Styles.Pie);
pie.Circled = true;
pie.Pen.Visible = false;
pie.BevelPercent = 30;
pie.EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Curved;
pie.Marks.Pen.Visible = false;
pie.Marks.Transparency = 30;
pie.Marks.Arrow.Color = Color.White;
ch1.Series[0].FillSampleValues();
ch1.Legend.Shadow.Visible = false;
ch1.Legend.Visible = false;
ch1.Panel.Gradient.Visible = false;
ch1.Panel.Color = Color.White;
ch1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
ch1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
// Apply palette
Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(ch1.Chart,13);
}
Hello,
This is the code I used in an ASP.NET WebForm to produce the screenshot in my last message:
protected void Page_Load(object sender, EventArgs e)
{
Chart chart = WebChart1.Chart;
chart.CurrentTheme = ThemeType.TeeChart;
chart.Aspect.View3D = false;
Pie pie = new Pie(chart);
pie.FillSampleValues();
chart.Panel.Gradient.Visible = false;
chart.Panel.Color = Color.White;
chart.Panel.Bevel.Inner = BevelStyles.None;
chart.Panel.Bevel.Outer = BevelStyles.None;
}
would you please be so kind as to run this code in a new WebForm to test whether you obtain the same results?
Yes, but can you please try your code with Steema sample website, because we develop our code based on Steema sample app, and with Sample application, border is there, so could you please replicate this your side and suggest which property need to set to remove outside border. Thanks in advance for your help <WINDIR>:\\Steema Software\Steema TeeChart for .NET 2015 Evaluation 4.1.2015.12166\Examples\TeeChartForNET\Chart Styles\Standard\ PieChart.aspx Hi Christopher, As you suggest, I have tried your code with new webform but same result. Charts are coming with border. Also again I have tried with Steema Example website, result is same, charts coming with border (reefer attachment) Hi Christopher, As you suggest, I have tried your code with new webform but same result. Charts are coming with border. Also again I have tried with Steema Example website, result is same, charts coming with border (refer attachment) Created attachment 675 [details]
Screenshot with steema web app and Christopher suggested code
Hi Christopher, Sorry to come back again, are you able to replicate issue with Steema's .net web site as i explained in my last comments. Hello Deepak,
I would like inform you that I can remove the Panel borders from the WebChart without problems in a simple example and in the standard ASP.NET TeeChart demo, using the Chris code in the both cases. The code below shows the changes applied in the PieChart ASP.NET TeeChart demo:
protected void Page_Load(object sender, System.EventArgs e)
{
//WebChart1.Chart.Panel.BorderRound = 30;
Steema.TeeChart.Chart ch1=WebChart1.Chart;
ch1.Aspect.View3D = false;
ch1.Series.RemoveAllSeries();
ch1.Series.Add(new Steema.TeeChart.Styles.Pie());
Steema.TeeChart.Styles.Pie pie = (ch1.Series[0] as Steema.TeeChart.Styles.Pie);
pie.Circled = true;
pie.Pen.Visible = false;
pie.BevelPercent = 30;
pie.EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Curved;
pie.Marks.Transparency = 30;
pie.Marks.Arrow.Color = Color.White;
ch1.Series[0].FillSampleValues();
ch1.Legend.Shadow.Visible = false;
ch1.Legend.Visible = false;
ch1.Panel.Gradient.Visible = false;
ch1.Panel.Pen.Visible = false;
ch1.Panel.Shadow.Visible = false;
ch1.Panel.Color = System.Drawing.Color.White;
ch1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
ch1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
// Apply palette
Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(ch1.Chart,13);
}
Attached you find an image with results. Note I have gotten the same results as Chris.
Created attachment 677 [details]
PieChart Sandra results
Thank You Sandra, Now I am able to remove the borders from the charts, but wondering, I managed to remove borders from outr charts by removing these lines Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None Panel.Bevel.Width = 0 But anyways this is now without border. Thank you very much. Now I need some more help regarding Gradient, In old charts do not have gradient at all, but new version showing gradient to charts. I managed to remove gradient for Panel, but inside bar charts and region charts, still showing gradient. Please see attached screen shot. Please suggest on this as well. Thanks in advance. Created attachment 679 [details]
ScreenSHot-GradientIssue
Hi Team, These issues are need to fix urgently, please suggest which property to use to remove gradient for Bar chart and region chart. Please refer to screen shots and suggest. Thanks Try: tChart1.Walls.Back.Gradient.Visible = false; Thank You Christopher, manage to remove gradient. Can you please suggest about how to remove Pie chart border line, we need to to remove these border line from pie charts , you can refer attached image, were we need t remove lines. Created attachment 687 [details]
Bar chart border issue
Created attachment 688 [details] screenshot You can set the Pie Pen visibility to false, e.g. private void InitializeChart() { tChart1.Aspect.View3D = false; Pie pie = new Pie(tChart1.Chart); pie.FillSampleValues(); pie.Pen.Visible = false; } This will give you the image attached. Please note that this is a case in which your issue was not a bug nor an enhancement, and so discussion of it should be occurring on http://support.steema.com. Please address your future support queries to http://support.steema.com, thank you. Hi Christopher, When we start upgrade to new chart, we were getting object reference error, so at that moment we do not know that this is a bug or need to discuss at forum. We fixed this issue by supply some extra properties values, which was not the case in old DLL, means backward compatibility was not handled completely. and we do not know which property has been made mandatory, so we only think this as a bug. But at last we resolved this and thank you for your help and suggestion for this. Please suggest for bug 1726 as well, because definitely Area charts rendering is different when upgrade to latest version from 1.1 version. Hello Deepak, This site, bugs.teechart.net, is for TeeChart bugs which can clearly be demonstrated by a Minimal, Complete, and Verifiable Example (an MCVE) as defined here: http://stackoverflow.com/help/mcve If your issue is not a bug that can be clearly demonstrated by an MCVE, then it should be posted to: http://support.steema.com Thank you very much for your cooperation! Thank You Christopher, You can mark this to resolved, but the other bug 1726 is surely having MCVE provided, Please suggest on this bug. Thanks |