Hello.Excuse for my bad english.
I need draw series(A) after drawing and showing other series(B), because series(A) draw using values in pixels series(B).
What chart(series, form) method better used for my task?
need help for choosing moment for draw series
Re: need help for choosing moment for draw series
Hi petroV,
I think you should create your first series (A) and populate it with the desired data. Then, you should force the chart to be drawn with Draw() method. Then, once the series is drawn, you'll be able to use series (A) CalcXPos() and CalcYPos() to calculate the values for the second series (B).
If you need a more detailed explanation it would be helpful if we can have more information. So, if you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the situation here.
I think you should create your first series (A) and populate it with the desired data. Then, you should force the chart to be drawn with Draw() method. Then, once the series is drawn, you'll be able to use series (A) CalcXPos() and CalcYPos() to calculate the values for the second series (B).
If you need a more detailed explanation it would be helpful if we can have more information. So, if you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the situation here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: need help for choosing moment for draw series
thank you, i'll try
other question. sample code:
form size height = 300
after run program, afterDrawValue don't work. need force chart repaint with resize control or zooming
i want, that after shawing form algorithm in AfterDrawValue work. What method need call, for executing shape_AfterDrawValues.
other question. sample code:
Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Steema.TeeChart.Styles;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
string _text = "test";
public Form1()
{
InitializeComponent();
Shape shape = new Shape(tChart1.Chart);
shape.Text = new string[1];
shape.Add(0, 0);
shape.Add(1, 1);
shape.AfterDrawValues += new Steema.TeeChart.PaintChartEventHandler(shape_AfterDrawValues);
shape = new Shape(tChart1.Chart);
shape.Add(1, 1);
shape.Add(100, 100);
shape.Text = new string[1];
shape.AfterDrawValues += new Steema.TeeChart.PaintChartEventHandler(shape_AfterDrawValues);
}
void shape_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
Shape shape = sender as Shape;
int size = Math.Abs(shape.CalcYPos(0) - shape.CalcYPos(1));
double fsize = g.TextHeight(shape.Font, _text);
if (size + 4 < fsize)
shape.Text[0] = "";
else
shape.Text[0] = _text;
shape.RefreshSeries();
}
}
}
after run program, afterDrawValue don't work. need force chart repaint with resize control or zooming
i want, that after shawing form algorithm in AfterDrawValue work. What method need call, for executing shape_AfterDrawValues.
Re: need help for choosing moment for draw series
understand. answer in 2 post )) method DRAW()