Can I restrict the height of ColorBand?
Can I restrict the height of ColorBand?
What I want is the ability to display ColorBands, but only for a certain percentage of the axis they are attached to. That way, they will remain stationary on the chart even if the axis range changes. I have investigated drawing rectangles with Graphic3D and would rather not have to go that way. Does anyone have any suggestions? Is there another tool that might be able to do this? Is this type of functionality other are interested in and therefore might be worth adding to the product?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Can I restrict the height of ColorBand?
Hi AndrewP,
Thanks in advance.
I think I understand this point. It's not possible using ColorBand. You may want to use Shape series with Style set to rectangle or also RectangleTool.What I want is the ability to display ColorBands, but only for a certain percentage of the axis they are attached to.
I don't understand this. Could you please elaborate on that so that we can suggest most suitable solution? Feel free to attach an image if you think it would make the explanation easier or clearer.That way, they will remain stationary on the chart even if the axis range changes.
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 |
Re: Can I restrict the height of ColorBand?
What I want to see is colored bands that only display in the bottom 10% of a given axis. Now if the axis changes (the range increases or decreases) the Colorbands should remain at 10%.
Can I restrict the ColorBand tool to display only within 1 X Axis AND 1 Y Axis?
Can I restrict the ColorBand tool to display only within 1 X Axis AND 1 Y Axis?
Re: Can I restrict the height of ColorBand?
I just uploaded an image. What you see if 2 series each on a different Y axis and on the same X axis. The ColorBands (Grenn and Black) are attached to the X axis and appears accross both Y axis. What I want to do is:
- Primary - restrict the ColorBands to one Y axis...
- Secondary - restrict the ColorBands to a part of one Y axis (say the bottom 10% of the Y axis).
What is the best way for me to accomplish this?
- Primary - restrict the ColorBands to one Y axis...
- Secondary - restrict the ColorBands to a part of one Y axis (say the bottom 10% of the Y axis).
What is the best way for me to accomplish this?
Re: Can I restrict the height of ColorBand?
Hello AndrewP,
I hope will helps.
Thanks,
You couldn't restrict the ColorBand if you have only one Chart, because colorBand is associated with Bottom Axes and only there are one Bottom Axes.What I want to see is colored bands that only display in the bottom 10% of a given axis. Now if the axis changes (the range increases or decreases) the Colorbands should remain at 10%.
Can I restrict the ColorBand tool to display only within 1 X Axis AND 1 Y Axis?
I made a simple code, using a shape series as ColorBand. You could do a similar code as next, please check that next code works correctly in your application.I just uploaded an image. What you see if 2 series each on a different Y axis and on the same X axis. The ColorBands (Grenn and Black) are attached to the X axis and appears accross both Y axis. What I want to do is:
- Primary - restrict the ColorBands to one Y axis...
- Secondary - restrict the ColorBands to a part of one Y axis (say the bottom 10% of the Y axis).
What is the best way for me to accomplish this?
Code: Select all
Steema.TeeChart.Styles.Shape shape;
Steema.TeeChart.Styles.Line line1, line2;
double x0, x1, y0, y1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
shape = new Steema.TeeChart.Styles.Shape(tChart1.Chart);
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Color = Color.Yellow;
line2.Color = Color.Blue;
line1.Pointer.Visible = true;
line1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Triangle;
line1.Pointer.InflateMargins = false;
line1.FillSampleValues();
line2.FillSampleValues();
//You need paint series after calculate values of shape.
tChart1.Draw();
//Shape series
shape.Style = Steema.TeeChart.Styles.ShapeStyles.Rectangle;
shape.Pen.Visible = false;
shape.ShowInLegend = false;
x0 = tChart1.Axes.Bottom.Minimum;
x1 = tChart1.Axes.Bottom.Maximum / 12;
y0 = tChart1.Axes.Left.Minimum;
y1 = tChart1.Axes.Left.Maximum / 6;
shape.X0 = x0;
shape.Y0 = y0;
shape.X1 = x1;
shape.Y1 = y1;
}
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 |