COM exception on call of putLogarithmic(TRUE)
Posted: Thu May 27, 2004 8:57 pm
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
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