Hi,
I'm using Bubble line to mark some points on a teeChart .net control.
how can i set the bubble radius to fixed size (in pixel) so it won't resize on zoom according to the axes?
Fixed pixel size for bubble radius
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi miki,
In that case you should set bubble's radius to change dynamically according to chart dimensions instead of axes scales and update those values every time chart is zoomed or unzoomed. I think it's much easier using Points series for that with its Pointer.Style property set to display a circle. With Points series you can set pointer dimensions in pixels, for example:
If you need to use different sizes for each point then you can use a new series for every point you want to plot, for example:
In that case you should set bubble's radius to change dynamically according to chart dimensions instead of axes scales and update those values every time chart is zoomed or unzoomed. I think it's much easier using Points series for that with its Pointer.Style property set to display a circle. With Points series you can set pointer dimensions in pixels, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
points1.Pointer.HorizSize = 5;
points1.Pointer.VertSize = 5;
points1.Add(0, 1, Color.Red);
points1.Add(1, 6, Color.Blue);
points1.Add(2, 2, Color.Yellow);
points1.Add(3, 3, Color.Green);
}
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
AddPoint(0, 1, 3, Color.Red);
AddPoint(1, 6, 4, Color.Blue);
AddPoint(2, 2, 1, Color.Yellow);
AddPoint(3, 3, 2, Color.Green);
}
private void AddPoint(double x, double y, int radius, Color color)
{
Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
points1.Pointer.HorizSize = radius;
points1.Pointer.VertSize = radius;
points1.Add(x, y, color);
}
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 |