![]() | 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: | Histogram series with a single values makes wrong axis range. | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | narcís calvet <narcis> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | major | CC: | chris, nagai |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.teechart.net/directline/viewtopic.php?f=6&t=1007 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
Something similar occurs when adding a 2nd point to the 2nd series:
Steema.TeeChart.Styles.Histogram histogram1 = new Steema.TeeChart.Styles.Histogram(tChart1.Chart);
Steema.TeeChart.Styles.Histogram histogram2 = new Steema.TeeChart.Styles.Histogram(tChart1.Chart);
for (int i = 0; i < 24; i++)
{
histogram1.Add(i);
}
double tmp = histogram1.MaxYValue() + 1;
histogram1.Add(tmp);
histogram2.Add(tmp);
histogram2.Add(tmp);
A workaround to the problem is adding a negative MinimumOffset value to the bottom axis: tChart1.Axes.Bottom.MinimumOffset = -1; Similar problem in VCL: http://bugs.teechart.net/show_bug.cgi?id=1233 This issue can be fixed by the addition of null points, e.g.
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Histogram histogram1 = new Steema.TeeChart.Styles.Histogram(tChart1.Chart);
Steema.TeeChart.Styles.Histogram histogram2 = new Steema.TeeChart.Styles.Histogram(tChart1.Chart);
for (int i = 0; i < 24; i++)
{
histogram1.Add(i);
histogram2.Add();
}
double tmp = histogram1.MaxYValue() + 1;
histogram1.Add(tmp);
histogram2.Add(tmp);
}
|
In the code snippet below, adding one single value to the second Histogram series completely breaks bottom axis scale. Steema.TeeChart.Styles.Histogram histogram1 = new Steema.TeeChart.Styles.Histogram(tChart1.Chart); Steema.TeeChart.Styles.Histogram histogram2 = new Steema.TeeChart.Styles.Histogram(tChart1.Chart); for (int i = 0; i < 24; i++) { histogram1.Add(i); } double tmp = histogram1.MaxYValue() + 1; histogram1.Add(tmp); histogram2.Add(tmp);