Is there a builtin function to calculate the actual xyz values of coordintes for ternary plots? Not the screen pixel values...or will i have to write my own?
pixels to real coords...
Function for calculating actual xyz values
Re: Function for calculating actual xyz values
Hello lilo,
You can calculate x,y and z values, using property of ternary series XValues(),YValues(),ZValues(), that returns the real values of Chart.
I hope will helps.
Thanks,
You can calculate x,y and z values, using property of ternary series XValues(),YValues(),ZValues(), that returns the real values of Chart.
I hope will helps.
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 |
Re: Function for calculating actual xyz values
is there a property that takes the screen pixel value as input and gives the real value as a result?
Re: Function for calculating actual xyz values
Hello lilo,
Sorry, I haven't understood good, your question.
I hope will helps.
Thanks,
Sorry, I haven't understood good, your question.
Yes exist. I suggest you that use method YScreenToValue() and XScreenToValue() that returns the corresponding Y and X values of a Screen position between Axis limits.is there a property that takes the screen pixel value as input and gives the real value as a result?
I hope will helps.
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 |
Re: Function for calculating actual xyz values
For Ternary Plot, this property outputs drawing x and y coordinates as used by the chart. I am not sure if this is a bug or not. Is there a formula to convert these values to axes coordinates?
I am wanting to draw lines on the ternary plot programatically using drawline, but my coordinates are in axes coordinates (0-100).
I am wanting to draw lines on the ternary plot programatically using drawline, but my coordinates are in axes coordinates (0-100).
Re: Function for calculating actual xyz values
Hello lilo,
I have made a simple example using Mouse Move event for return the XScreenValues() and YScreenValue() and values are correct for me. Please, could you check it works as you want. if it doesn't work as you like, please modifies code because we try to help you find a solution.
Thanks,
I have made a simple example using Mouse Move event for return the XScreenValues() and YScreenValue() and values are correct for me. Please, could you check it works as you want. if it doesn't work as you like, please modifies code because we try to help you find a solution.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Ternary series1;
private void InitializeChart()
{
series1 = new Steema.TeeChart.Styles.Ternary(tChart1.Chart);
series1.FillSampleValues();
tChart1.MouseMove += new MouseEventHandler(tChart1_MouseMove);
}
void tChart1_MouseMove(object sender, MouseEventArgs e)
{
this.Text = "X: " + Math.Truncate(series1.XScreenToValue(e.X)).ToString() + "Y: " + Math.Truncate(series1.YScreenToValue(e.Y)).ToString();
}
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 |
Re: Function for calculating actual xyz values
I am using the same code, but the values i am getting are incorrect. I have autoscale set to true and axes in percentage.
The x axes shows 7 min and 49 max
The y axis shows 11min and 69 max at the apexes of the triangle.
Should I be using some kind of offset value?
I am using vb2010 express.
The x axes shows 7 min and 49 max
The y axis shows 11min and 69 max at the apexes of the triangle.
Should I be using some kind of offset value?
I am using vb2010 express.
Re: Function for calculating actual xyz values
I solved the problem by setting up a manual scale.
I am gradually learning my way around tchart.
Thanks for your help.
I am gradually learning my way around tchart.
Thanks for your help.
Re: Function for calculating actual xyz values
Hello lilo,
I am glad that you solved your problem .
Thanks,
I am glad that you solved your problem .
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 |