Hi,
I created a curve viewer using TChart to vizualize data.
Everything works fine excepts that I wan't to be able to
change the logarithmic status dynamicly.
I first set the logarithmic status to true and then I set
the data in the chart. Until there everything is perfect and
the Y axis is logarithmic and the X axis linear, just as I want.
But once the data is set to the chart, I am able to modify the
X axis logarithmic status but the Y axis logarithmic throw an
exception if I set it to true.
Any idea why this happens?
Here is the code I use:
//m_p_chart is a TeeChart::ITChart interface.
//v_Data and v_time are SafeArrays put in Variants.
//That line works fine<<<<<<<<<<<<<<<<<<<<<<<<<<<
m_p_chart->GetAxis()->GetLeft()->Logarithmic = true;
m_p_chart->AddSeries(TeeChart::scLine);
m_p_chart->Series(m_n_curves)->GetasLine()->GetPointer()->PutStyle(TeeChart::psSmallDot);
m_p_chart->Series(m_n_curves)->GetasLine()->GetPointer()->GetBrush()->PutColor(RGB(red,green,blue));
m_p_chart->Series(m_n_curves)->AddArray(n_points.ulVal, v_Data, v_time);
//That line throws an exception<<<<<<<<<<<<<<<<<<<<<<
m_p_chart->GetAxis()->GetLeft()->Logarithmic = true;
I trace the code and the put_Logarithmic() function returns
E_UNEXEPECTED when parameter is VARIANT_BOOL = 1.
This cause the exeption.
Thank you very much.
---
Mathieu
COM exception on call of putLogarithmic(TRUE)
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Mathieu,
news://www.berneda.com/steema.public.attachments
Thank you!
I'm afraid I can't get this code to throw an exception here. Could you please create a small project that I can run "as-is" to reproduce the problem here? Please post the project to://m_p_chart is a TeeChart::ITChart interface.
//v_Data and v_time are SafeArrays put in Variants.
//That line works fine<<<<<<<<<<<<<<<<<<<<<<<<<<<
m_p_chart->GetAxis()->GetLeft()->Logarithmic = true;
m_p_chart->AddSeries(TeeChart::scLine);
m_p_chart->Series(m_n_curves)->GetasLine()->GetPointer()->PutStyle(TeeChart::psSmallDot);
m_p_chart->Series(m_n_curves)->GetasLine()->GetPointer()->GetBrush()->PutColor(RGB(red,green,blue));
m_p_chart->Series(m_n_curves)->AddArray(n_points.ulVal, v_Data, v_time);
//That line throws an exception<<<<<<<<<<<<<<<<<<<<<<
m_p_chart->GetAxis()->GetLeft()->Logarithmic = true;
news://www.berneda.com/steema.public.attachments
Thank you!
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/