override text and positioning of marks
override text and positioning of marks
In the vcl and .net versions I have been able to override the behavior of the marks so that I can position a label at the end of lines. How would I start to go about doing that in this version?
Re: override text and positioning of marks
Hello,
I'm not sure to understand what are you exactly trying to achieve. Could you please post some code in delphi/C# and maybe an image showing the resulting so we can better understand what are you exactly trying to do?WCantrall wrote:In the vcl and .net versions I have been able to override the behavior of the marks so that I can position a label at the end of lines. How would I start to go about doing that in this version?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: override text and positioning of marks
For instance, this is from the .net tutorial:
OnGetSeriesMark
Use the OnGetSeriesMark event to modify the Mark contents at runtime. The following code varies the MarkText according to the value relative to the last;
OnGetSeriesMark
Use the OnGetSeriesMark event to modify the Mark contents at runtime. The following code varies the MarkText according to the value relative to the last;
Code: Select all
[C#] private void line1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
if(e.ValueIndex > 0)
{
if(line1.YValues[e.ValueIndex] > line1.YValues[e.ValueIndex - 1])
{
e.MarkText = e.MarkText + " (Up)";
}
else if(line1.YValues[e.ValueIndex] < line1.YValues[e.ValueIndex - 1])
{
e.MarkText = e.MarkText + " (Down)";
}
else
{
e.MarkText = e.MarkText + " (No Change)";
}
}
}
Re: override text and positioning of marks
OK, I believe I have more of a grasp of this, as I have tried using Chart.ondraw. What I need now is an example of series calc(index,p) to determine the x and y of the data point.
Thanks!
Thanks!
Re: override text and positioning of marks
Hello,
I'm not sure about what are you exactly trying to do but here you have an example of using the series calc function:
I'm not sure about what are you exactly trying to do but here you have an example of using the series calc function:
Code: Select all
function draw() {
Chart1=new Tee.Chart("canvas1");
s = new Tee.Bar().addRandom();
Chart1.addSeries(s);
var myFormat = new Tee.Format(Chart1);
myFormat.gradient.visible=true;
myFormat.gradient.colors=["white","lime"];
myFormat.transparency=0.3;
Chart1.ondraw=function() {
var tmpP = new Point(0,0);
for (t=0; t<s.count(); t++) {
s.calc(t, tmpP);
myFormat.rectangle(tmpP.x-5, tmpP.y, 10, 5);
}
}
Chart1.draw();
}
function Point(x,y) {
this.x=x;
this.y=y;
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |