Hello,
I am using the AxisBreak tool to mask out certain areas of my chart on the x-axis using multiple axis breaks, each with GapSize = 30. In most cases the axis breaks mess up my x-axis labels and it seems that multiple labels get overdrawn then (see image attachment)... Is there any way to avoid this?
Thanks in advance
Philipp
Axis Breaks and corrupt axis labels
-
- Newbie
- Posts: 3
- Joined: Thu Dec 16, 2010 12:00 am
Axis Breaks and corrupt axis labels
- Attachments
-
- overlapping labels.png (91.62 KiB) Viewed 4472 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Axis Breaks and corrupt axis labels
Hi Philipp,
Can you please attach a simple example project we can run "as-is" to reproduce the problem here? A general option could be using custom axis labels as in the All Features\Welcome !\Axes\Labels\Custom labels example at the features demo available at TeeChart's program group.
Thanks in advance.
Can you please attach a simple example project we can run "as-is" to reproduce the problem here? A general option could be using custom axis labels as in the All Features\Welcome !\Axes\Labels\Custom labels example at the features demo available at TeeChart's program group.
Thanks in advance.
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 |
-
- Newbie
- Posts: 3
- Joined: Thu Dec 16, 2010 12:00 am
Re: Axis Breaks and corrupt axis labels
Hi Narcís,
The problem occurs with different gapsizes and x-axis ranges... I could reproduce the problem with the following small sample application:
The problem occurs with different gapsizes and x-axis ranges... I could reproduce the problem with the following small sample application:
Code: Select all
[MainForm.Designer.cs]
namespace GuiTestbench
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tChart1 = new Steema.TeeChart.TChart();
this.fastLine1 = new Steema.TeeChart.Styles.FastLine();
this.axisBreaksTool = new Steema.TeeChart.Tools.AxisBreaksTool();
this.SuspendLayout();
//
// tChart1
//
//
//
//
//
//
//
this.tChart1.Axes.Depth.LabelsAsSeriesTitles = true;
//
//
//
this.tChart1.Axes.DepthTop.LabelsAsSeriesTitles = true;
this.tChart1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tChart1.Location = new System.Drawing.Point(0, 0);
this.tChart1.Name = "tChart1";
this.tChart1.Series.Add(this.fastLine1);
this.tChart1.Size = new System.Drawing.Size(886, 465);
this.tChart1.TabIndex = 0;
this.tChart1.Tools.Add(this.axisBreaksTool);
//
// fastLine1
//
this.fastLine1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
this.fastLine1.ColorEach = false;
//
//
//
this.fastLine1.LinePen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
this.fastLine1.Title = "fastLine1";
this.fastLine1.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.Ignore;
//
//
//
this.fastLine1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
//
// axisBreaksTool
//
this.axisBreaksTool.Axis = this.tChart1.Axes.Bottom;
this.axisBreaksTool.GapSize = 5;
this.axisBreaksTool.ScaleAdjustment = 1E-07D;
//
// MainForm
//
this.ClientSize = new System.Drawing.Size(886, 465);
this.Controls.Add(this.tChart1);
this.Name = "MainForm";
this.Load += new System.EventHandler(this.MainForm_Load);
this.ResumeLayout(false);
}
#endregion
private Steema.TeeChart.TChart tChart1;
private Steema.TeeChart.Styles.FastLine fastLine1;
private Steema.TeeChart.Tools.AxisBreaksTool axisBreaksTool;
}
}
[MainForm.cs]
using System;
using System.Windows.Forms;
using Steema.TeeChart.Tools;
namespace GuiTestbench
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
fastLine1.FillSampleValues();
var axisBreak = new AxisBreak(axisBreaksTool)
{
Enabled = true,
StartValue = 8,
EndValue = 10,
Style = AxisBreakStyle.Line
};
}
}
}
- Attachments
-
- corrupt_labels.png (51.68 KiB) Viewed 4428 times
Re: Axis Breaks and corrupt axis labels
Hello Pilipp P.
The problem of overlaping of AxisBreaks can be solved of many ways,e.g:
1.- Changing the size of GapSize, adapting it to your labels space.
2.- Changing the scale of Axes.
3.- Changing the angle of labels.
4.- Using custom labels, etc.
Basically, you need treat this problem as you treat anyone of problems to overlap as do in this thread.
I hope will helps.
Thanks,
The problem of overlaping of AxisBreaks can be solved of many ways,e.g:
1.- Changing the size of GapSize, adapting it to your labels space.
2.- Changing the scale of Axes.
3.- Changing the angle of labels.
4.- Using custom labels, etc.
Basically, you need treat this problem as you treat anyone of problems to overlap as do in this thread.
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |