1. I'm having a small but annoying problem. I can't seem to turn off the label
for a pie chart - longer labels squishes the pie (because the Web Chart is
set to a certain width).
For example, the labels "Test" or "Approved" is fine, and the pie is a perfect circle.
But longer column labels like "Approved by Manager" squiches the pie - it
looks like an oval.
What property do I need to set?
Pie pie1 = new Steema.TeeChart.Styles.Pie(WebChart1.Chart);
pie1.YValues.DataMember = dt.Columns["Counter"].ToString();
pie1.LabelMember = dt.Columns[0].ToString();
pie1.ColorEach=true;
pie1.DataSource = dt;
2. Teecharts will not print....I get a red X on the print job. Is there
anything I have to do to enable printing?
My TempChart property is "Session"
Thanks in advance!
Pie Chart Sizing and Printing Issue
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello,
1) Setting pie1.Circled property to true.
2) Making series marks having multiple lines if they have a blank space using the OnGetSeriesMark event.
Here you have an example using both options:
You have a couple of options to solve that:1. I'm having a small but annoying problem. I can't seem to turn off the label
for a pie chart - longer labels squishes the pie (because the Web Chart is
set to a certain width).
For example, the labels "Test" or "Approved" is fine, and the pie is a perfect circle.
But longer column labels like "Approved by Manager" squiches the pie - it
looks like an oval.
What property do I need to set?
Pie pie1 = new Steema.TeeChart.Styles.Pie(WebChart1.Chart);
pie1.YValues.DataMember = dt.Columns["Counter"].ToString();
pie1.LabelMember = dt.Columns[0].ToString();
pie1.ColorEach=true;
pie1.DataSource = dt;
1) Setting pie1.Circled property to true.
2) Making series marks having multiple lines if they have a blank space using the OnGetSeriesMark event.
Here you have an example using both options:
Code: Select all
private void Page_Load(object sender, System.EventArgs e)
{
Steema.TeeChart.Styles.Pie pie1 = new Steema.TeeChart.Styles.Pie(WebChart1.Chart);
pie1.Circled=true;
pie1.Add(5,"Approved");
pie1.Add(7,"Tested");
pie1.Add(3,"Approved by Manager");
pie1.Add(8,"Pending");
pie1.GetSeriesMark+=new Steema.TeeChart.Styles.Series.GetSeriesMarkEventHandler(pie1_GetSeriesMark);
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void pie1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
string MultiLineStr = e.MarkText.Replace(" ","\n");
e.MarkText = MultiLineStr;
}
Do you also get a "red X" when doing a print previews? Do you have the WebChart in the browser as an image so that you can click it with the right-mouse button and, for example, print it?2. Teecharts will not print....I get a red X on the print job. Is there
anything I have to do to enable printing?
My TempChart property is "Session"
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Similar...
I'd like to do the same (convert "test label" to "test"<carriage return>"label") to the column labels, I'm sure it's possible.
Would I be accessing "GetXorizAxis"?
Would I be accessing "GetXorizAxis"?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi,
No, you need to use the OnGetAxisLabel event as done here:
No, you need to use the OnGetAxisLabel event as done here:
Code: Select all
private void WebChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (sender=WebChart1.Chart.Axes.Bottom)
{
string MultiLineStr = e.LabelText.Replace(" ","\n");
e.LabelText = MultiLineStr;
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |