1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_chart2.hxx"
30 #include "RegressionCurveHelper.hxx"
31 #include "MeanValueRegressionCurveCalculator.hxx"
32 #include "LinearRegressionCurveCalculator.hxx"
33 #include "LogarithmicRegressionCurveCalculator.hxx"
34 #include "ExponentialRegressionCurveCalculator.hxx"
35 #include "PotentialRegressionCurveCalculator.hxx"
36 #include "CommonConverters.hxx"
37 #include "RegressionCurveModel.hxx"
38 #include "ChartTypeHelper.hxx"
39 #include "ChartModelHelper.hxx"
41 #include "PropertyHelper.hxx"
43 #include "Strings.hrc"
44 #include "DiagramHelper.hxx"
45 #include <com/sun/star/chart2/XChartDocument.hpp>
47 using namespace ::com::sun::star
;
48 using namespace ::com::sun::star::chart2
;
50 using ::com::sun::star::uno::Reference
;
51 using ::com::sun::star::uno::Sequence
;
52 using ::com::sun::star::uno::XComponentContext
;
53 using ::com::sun::star::lang::XServiceName
;
54 using ::com::sun::star::beans::XPropertySet
;
55 using ::com::sun::star::uno::Exception
;
56 using ::rtl::OUString
;
60 OUString
lcl_getServiceNameForType( ::chart::RegressionCurveHelper::tRegressionType eType
)
62 OUString aServiceName
;
65 case ::chart::RegressionCurveHelper::REGRESSION_TYPE_LINEAR
:
66 aServiceName
= C2U( "com.sun.star.chart2.LinearRegressionCurve" );
68 case ::chart::RegressionCurveHelper::REGRESSION_TYPE_LOG
:
69 aServiceName
= C2U( "com.sun.star.chart2.LogarithmicRegressionCurve" );
71 case ::chart::RegressionCurveHelper::REGRESSION_TYPE_EXP
:
72 aServiceName
= C2U( "com.sun.star.chart2.ExponentialRegressionCurve" );
74 case ::chart::RegressionCurveHelper::REGRESSION_TYPE_POWER
:
75 aServiceName
= C2U( "com.sun.star.chart2.PotentialRegressionCurve" );
78 OSL_ENSURE(false,"unknown regression curve type - use linear instead");
79 aServiceName
= C2U( "com.sun.star.chart2.LinearRegressionCurve" );
84 } // anonymous namespace
86 //.............................................................................
89 //.............................................................................
92 Reference
< XRegressionCurve
> RegressionCurveHelper::createMeanValueLine(
93 const Reference
< XComponentContext
> & xContext
)
95 return Reference
< XRegressionCurve
>(
96 new MeanValueRegressionCurve( xContext
));
100 Reference
< XRegressionCurve
> RegressionCurveHelper::createRegressionCurveByServiceName(
101 const Reference
< XComponentContext
> & xContext
,
102 ::rtl::OUString aServiceName
)
104 Reference
< XRegressionCurve
> xResult
;
106 // todo: use factory methods with service name
107 if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
108 "com.sun.star.chart2.LinearRegressionCurve" )))
111 new LinearRegressionCurve( xContext
));
113 else if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
114 "com.sun.star.chart2.LogarithmicRegressionCurve" )))
117 new LogarithmicRegressionCurve( xContext
));
119 else if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
120 "com.sun.star.chart2.ExponentialRegressionCurve" )))
123 new ExponentialRegressionCurve( xContext
));
125 else if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
126 "com.sun.star.chart2.PotentialRegressionCurve" )))
129 new PotentialRegressionCurve( xContext
));
135 // ------------------------------------------------------------
138 Reference
< XRegressionCurveCalculator
> RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(
139 ::rtl::OUString aServiceName
)
141 Reference
< XRegressionCurveCalculator
> xResult
;
143 // todo: use factory methods with service name
144 if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
145 "com.sun.star.chart2.MeanValueRegressionCurve" )))
147 xResult
.set( new MeanValueRegressionCurveCalculator());
149 if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
150 "com.sun.star.chart2.LinearRegressionCurve" )))
152 xResult
.set( new LinearRegressionCurveCalculator());
154 else if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
155 "com.sun.star.chart2.LogarithmicRegressionCurve" )))
157 xResult
.set( new LogarithmicRegressionCurveCalculator());
159 else if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
160 "com.sun.star.chart2.ExponentialRegressionCurve" )))
162 xResult
.set( new ExponentialRegressionCurveCalculator());
164 else if( aServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
165 "com.sun.star.chart2.PotentialRegressionCurve" )))
167 xResult
.set( new PotentialRegressionCurveCalculator());
174 void RegressionCurveHelper::initializeCurveCalculator(
175 const Reference
< XRegressionCurveCalculator
> & xOutCurveCalculator
,
176 const Reference
< data::XDataSource
> & xSource
,
177 bool bUseXValuesIfAvailable
/* = true */ )
179 if( ! (xOutCurveCalculator
.is() &&
183 Sequence
< double > aXValues
, aYValues
;
184 bool bXValuesFound
= false, bYValuesFound
= false;
186 Sequence
< Reference
< data::XLabeledDataSequence
> > aDataSeqs( xSource
->getDataSequences());
189 ! (bXValuesFound
&& bYValuesFound
) && i
<aDataSeqs
.getLength();
194 Reference
< data::XDataSequence
> xSeq( aDataSeqs
[i
]->getValues());
195 Reference
< XPropertySet
> xProp( xSeq
, uno::UNO_QUERY_THROW
);
196 ::rtl::OUString aRole
;
197 if( xProp
->getPropertyValue(
198 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Role" ))) >>= aRole
)
200 if( bUseXValuesIfAvailable
&&
202 aRole
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "values-x" )))
204 aXValues
= DataSequenceToDoubleSequence( xSeq
);
205 bXValuesFound
= true;
207 else if( ! bYValuesFound
&&
208 aRole
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "values-y" )))
210 aYValues
= DataSequenceToDoubleSequence( xSeq
);
211 bYValuesFound
= true;
215 catch( Exception
& ex
)
217 ASSERT_EXCEPTION( ex
);
221 if( ! bXValuesFound
&&
224 // initialize with 1, 2, ...
225 //first category (index 0) matches with real number 1.0
226 aXValues
.realloc( aYValues
.getLength());
227 for( i
=0; i
<aXValues
.getLength(); ++i
)
229 bXValuesFound
= true;
232 if( bXValuesFound
&& bYValuesFound
&&
233 aXValues
.getLength() > 0 &&
234 aYValues
.getLength() > 0 )
235 xOutCurveCalculator
->recalculateRegression( aXValues
, aYValues
);
239 void RegressionCurveHelper::initializeCurveCalculator(
240 const Reference
< XRegressionCurveCalculator
> & xOutCurveCalculator
,
241 const Reference
< XDataSeries
> & xSeries
,
242 const Reference
< frame::XModel
> & xModel
)
244 sal_Int32 nAxisType
= ChartTypeHelper::getAxisType(
245 ChartModelHelper::getChartTypeOfSeries( xModel
, xSeries
), 0 ); // x-axis
247 initializeCurveCalculator( xOutCurveCalculator
,
248 uno::Reference
< data::XDataSource
>( xSeries
, uno::UNO_QUERY
),
249 (nAxisType
== AxisType::REALNUMBER
) );
252 // ----------------------------------------
255 bool RegressionCurveHelper::hasMeanValueLine(
256 const uno::Reference
< XRegressionCurveContainer
> & xRegCnt
)
263 uno::Sequence
< uno::Reference
< XRegressionCurve
> > aCurves(
264 xRegCnt
->getRegressionCurves());
265 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
267 if( isMeanValueLine( aCurves
[i
] ))
271 catch( Exception
& ex
)
273 ASSERT_EXCEPTION( ex
);
280 bool RegressionCurveHelper::isMeanValueLine(
281 const uno::Reference
< chart2::XRegressionCurve
> & xRegCurve
)
283 uno::Reference
< XServiceName
> xServName( xRegCurve
, uno::UNO_QUERY
);
284 if( xServName
.is() &&
285 xServName
->getServiceName().equals(
286 C2U( "com.sun.star.chart2.MeanValueRegressionCurve" )))
292 uno::Reference
< chart2::XRegressionCurve
>
293 RegressionCurveHelper::getMeanValueLine(
294 const uno::Reference
< chart2::XRegressionCurveContainer
> & xRegCnt
)
300 uno::Sequence
< uno::Reference
< XRegressionCurve
> > aCurves(
301 xRegCnt
->getRegressionCurves());
302 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
304 if( isMeanValueLine( aCurves
[i
] ))
308 catch( Exception
& ex
)
310 ASSERT_EXCEPTION( ex
);
314 return uno::Reference
< chart2::XRegressionCurve
>();
318 void RegressionCurveHelper::addMeanValueLine(
319 uno::Reference
< XRegressionCurveContainer
> & xRegCnt
,
320 const uno::Reference
< XComponentContext
> & xContext
,
321 const uno::Reference
< XPropertySet
> & xSeriesProp
)
324 ::chart::RegressionCurveHelper::hasMeanValueLine( xRegCnt
) )
327 // todo: use a valid context
328 uno::Reference
< XRegressionCurve
> xCurve( createMeanValueLine( xContext
));
329 xRegCnt
->addRegressionCurve( xCurve
);
331 if( xSeriesProp
.is())
333 uno::Reference
< XPropertySet
> xProp( xCurve
, uno::UNO_QUERY
);
336 xProp
->setPropertyValue( C2U( "LineColor" ),
337 xSeriesProp
->getPropertyValue( C2U( "Color" )));
343 void RegressionCurveHelper::removeMeanValueLine(
344 Reference
< XRegressionCurveContainer
> & xRegCnt
)
351 Sequence
< Reference
< XRegressionCurve
> > aCurves(
352 xRegCnt
->getRegressionCurves());
353 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
355 if( isMeanValueLine( aCurves
[i
] ))
357 xRegCnt
->removeRegressionCurve( aCurves
[i
] );
358 // attention: the iterator i has become invalid now
360 // note: assume that there is only one mean-value curve
361 // to remove multiple mean-value curves remove the break
366 catch( Exception
& ex
)
368 ASSERT_EXCEPTION( ex
);
372 void RegressionCurveHelper::addRegressionCurve(
373 tRegressionType eType
,
374 uno::Reference
< XRegressionCurveContainer
> & xRegCnt
,
375 const uno::Reference
< XComponentContext
> & /* xContext */,
376 const uno::Reference
< beans::XPropertySet
>& xPropertySource
,
377 const uno::Reference
< beans::XPropertySet
>& xEquationProperties
)
382 if( eType
== REGRESSION_TYPE_NONE
)
384 OSL_ENSURE(false,"don't create a regression curve of type none");
388 uno::Reference
< chart2::XRegressionCurve
> xCurve
;
389 ::rtl::OUString
aServiceName( lcl_getServiceNameForType( eType
));
391 if( aServiceName
.getLength())
393 // todo: use a valid context
394 xCurve
.set( createRegressionCurveByServiceName(
395 uno::Reference
< uno::XComponentContext
>(), aServiceName
));
397 if( xEquationProperties
.is())
398 xCurve
->setEquationProperties( xEquationProperties
);
400 uno::Reference
< beans::XPropertySet
> xProp( xCurve
, uno::UNO_QUERY
);
403 if( xPropertySource
.is())
404 comphelper::copyProperties( xPropertySource
, xProp
);
407 uno::Reference
< XPropertySet
> xSeriesProp( xRegCnt
, uno::UNO_QUERY
);
408 if( xSeriesProp
.is())
410 xProp
->setPropertyValue( C2U( "LineColor" ),
411 xSeriesProp
->getPropertyValue( C2U( "Color" )));
413 // xProp->setPropertyValue( C2U( "LineWidth" ), uno::makeAny( sal_Int32( 100 )));
417 xRegCnt
->addRegressionCurve( xCurve
);
420 /** removes all regression curves that are not of type mean value
421 and returns true, if anything was removed
423 bool RegressionCurveHelper::removeAllExceptMeanValueLine(
424 uno::Reference
< chart2::XRegressionCurveContainer
> & xRegCnt
)
426 bool bRemovedSomething
= false;
431 uno::Sequence
< uno::Reference
< chart2::XRegressionCurve
> > aCurves(
432 xRegCnt
->getRegressionCurves());
433 ::std::vector
< uno::Reference
< chart2::XRegressionCurve
> > aCurvesToDelete
;
434 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
436 if( ! isMeanValueLine( aCurves
[i
] ))
438 aCurvesToDelete
.push_back( aCurves
[ i
] );
442 for( ::std::vector
< uno::Reference
< chart2::XRegressionCurve
> >::const_iterator aIt
= aCurvesToDelete
.begin();
443 aIt
!= aCurvesToDelete
.end(); ++aIt
)
445 xRegCnt
->removeRegressionCurve( *aIt
);
446 bRemovedSomething
= true;
449 catch( uno::Exception
& ex
)
451 ASSERT_EXCEPTION( ex
);
454 return bRemovedSomething
;
457 void RegressionCurveHelper::removeEquations(
458 uno::Reference
< chart2::XRegressionCurveContainer
> & xRegCnt
)
464 uno::Sequence
< uno::Reference
< chart2::XRegressionCurve
> > aCurves(
465 xRegCnt
->getRegressionCurves());
466 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
468 if( !isMeanValueLine( aCurves
[i
] ) )
470 uno::Reference
< chart2::XRegressionCurve
> xRegCurve( aCurves
[ i
] );
473 uno::Reference
< beans::XPropertySet
> xEqProp( xRegCurve
->getEquationProperties() ) ;
476 xEqProp
->setPropertyValue( C2U("ShowEquation"), uno::makeAny( false ));
477 xEqProp
->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false ));
483 catch( uno::Exception
& ex
)
485 ASSERT_EXCEPTION( ex
);
491 void RegressionCurveHelper::replaceOrAddCurveAndReduceToOne(
492 tRegressionType eType
,
493 uno::Reference
< XRegressionCurveContainer
> & xRegCnt
,
494 const uno::Reference
< XComponentContext
> & xContext
)
496 uno::Reference
< chart2::XRegressionCurve
> xRegressionCurve( getFirstCurveNotMeanValueLine( xRegCnt
));
497 if( ! xRegressionCurve
.is())
498 RegressionCurveHelper::addRegressionCurve( eType
, xRegCnt
, xContext
);
501 OUString
aServiceName( lcl_getServiceNameForType( eType
));
502 if( aServiceName
.getLength())
504 RegressionCurveHelper::removeAllExceptMeanValueLine( xRegCnt
);
505 RegressionCurveHelper::addRegressionCurve(
506 eType
, xRegCnt
, xContext
,
507 Reference
< beans::XPropertySet
>( xRegressionCurve
, uno::UNO_QUERY
),
508 xRegressionCurve
->getEquationProperties());
514 uno::Reference
< chart2::XRegressionCurve
> RegressionCurveHelper::getFirstCurveNotMeanValueLine(
515 const Reference
< XRegressionCurveContainer
> & xRegCnt
)
522 uno::Sequence
< uno::Reference
< chart2::XRegressionCurve
> > aCurves(
523 xRegCnt
->getRegressionCurves());
524 ::std::vector
< uno::Reference
< chart2::XRegressionCurve
> > aCurvesToDelete
;
525 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
527 if( ! isMeanValueLine( aCurves
[i
] ))
533 catch( Exception
& ex
)
535 ASSERT_EXCEPTION( ex
);
542 RegressionCurveHelper::tRegressionType
RegressionCurveHelper::getRegressionType(
543 const Reference
< XRegressionCurve
> & xCurve
)
545 tRegressionType eResult
= REGRESSION_TYPE_UNKNOWN
;
549 Reference
< lang::XServiceName
> xServName( xCurve
, uno::UNO_QUERY
);
552 ::rtl::OUString
aServiceName( xServName
->getServiceName() );
554 if( aServiceName
.equalsAsciiL(
555 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LinearRegressionCurve" )))
557 eResult
= REGRESSION_TYPE_LINEAR
;
559 else if( aServiceName
.equalsAsciiL(
560 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LogarithmicRegressionCurve" )))
562 eResult
= REGRESSION_TYPE_LOG
;
564 else if( aServiceName
.equalsAsciiL(
565 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ExponentialRegressionCurve" )))
567 eResult
= REGRESSION_TYPE_EXP
;
569 else if( aServiceName
.equalsAsciiL(
570 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.PotentialRegressionCurve" )))
572 eResult
= REGRESSION_TYPE_POWER
;
574 else if( aServiceName
.equalsAsciiL(
575 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.MeanValueRegressionCurve" )))
577 eResult
= REGRESSION_TYPE_MEAN_VALUE
;
581 catch( Exception
& ex
)
583 ASSERT_EXCEPTION( ex
);
590 RegressionCurveHelper::tRegressionType
RegressionCurveHelper::getFirstRegressTypeNotMeanValueLine(
591 const Reference
< XRegressionCurveContainer
> & xRegCnt
)
593 tRegressionType eResult
= REGRESSION_TYPE_NONE
;
597 Sequence
< Reference
< XRegressionCurve
> > aCurves(
598 xRegCnt
->getRegressionCurves());
599 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
601 tRegressionType eType
= getRegressionType( aCurves
[i
] );
602 if( eType
!= REGRESSION_TYPE_MEAN_VALUE
&&
603 eType
!= REGRESSION_TYPE_UNKNOWN
)
614 OUString
RegressionCurveHelper::getUINameForRegressionCurve( const Reference
< XRegressionCurve
>& xRegressionCurve
)
617 Reference
< lang::XServiceName
> xServiceName( xRegressionCurve
, uno::UNO_QUERY
);
618 if( ! xServiceName
.is())
621 OUString
aServiceName( xServiceName
->getServiceName());
622 if( aServiceName
.equalsAsciiL(
623 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.MeanValueRegressionCurve" )))
625 OSL_ENSURE( false, "Meanvalue lines in legend not supported" );
626 aResult
= OUString();
627 // aResult = ::chart::SchResId::getResString( STR_OBJECT_AVERAGE_LINE );
629 else if( aServiceName
.equalsAsciiL(
630 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LinearRegressionCurve" )))
632 aResult
= ::chart::SchResId::getResString( STR_REGRESSION_LINEAR
);
634 else if( aServiceName
.equalsAsciiL(
635 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LogarithmicRegressionCurve" )))
637 aResult
= ::chart::SchResId::getResString( STR_REGRESSION_LOG
);
639 else if( aServiceName
.equalsAsciiL(
640 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ExponentialRegressionCurve" )))
642 aResult
= ::chart::SchResId::getResString( STR_REGRESSION_EXP
);
644 else if( aServiceName
.equalsAsciiL(
645 RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.PotentialRegressionCurve" )))
647 aResult
= ::chart::SchResId::getResString( STR_REGRESSION_POWER
);
654 ::std::vector
< Reference
< chart2::XRegressionCurve
> >
655 RegressionCurveHelper::getAllRegressionCurvesNotMeanValueLine(
656 const Reference
< chart2::XDiagram
> & xDiagram
)
658 ::std::vector
< Reference
< chart2::XRegressionCurve
> > aResult
;
659 ::std::vector
< Reference
< chart2::XDataSeries
> > aSeries( DiagramHelper::getDataSeriesFromDiagram( xDiagram
));
660 for( ::std::vector
< Reference
< chart2::XDataSeries
> >::iterator
aIt( aSeries
.begin());
661 aIt
!= aSeries
.end(); ++aIt
)
663 Reference
< chart2::XRegressionCurveContainer
> xCurveCnt( *aIt
, uno::UNO_QUERY
);
666 uno::Sequence
< uno::Reference
< chart2::XRegressionCurve
> > aCurves(
667 xCurveCnt
->getRegressionCurves());
668 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
670 if( ! isMeanValueLine( aCurves
[i
] ))
671 aResult
.push_back( aCurves
[i
] );
680 void RegressionCurveHelper::resetEquationPosition(
681 const Reference
< chart2::XRegressionCurve
> & xCurve
)
687 const OUString
aPosPropertyName( RTL_CONSTASCII_USTRINGPARAM( "RelativePosition" ));
688 Reference
< beans::XPropertySet
> xEqProp( xCurve
->getEquationProperties()); // since m233: , uno::UNO_SET_THROW );
689 if( xEqProp
->getPropertyValue( aPosPropertyName
).hasValue())
690 xEqProp
->setPropertyValue( aPosPropertyName
, uno::Any());
692 catch( const uno::Exception
& ex
)
694 ASSERT_EXCEPTION( ex
);
699 sal_Int32
RegressionCurveHelper::getRegressionCurveIndex(
700 const Reference
< chart2::XRegressionCurveContainer
> & xContainer
,
701 const Reference
< chart2::XRegressionCurve
> & xCurve
)
705 uno::Sequence
< uno::Reference
< XRegressionCurve
> > aCurves(
706 xContainer
->getRegressionCurves());
707 for( sal_Int32 i
= 0; i
< aCurves
.getLength(); ++i
)
709 if( xCurve
== aCurves
[i
] )
716 bool RegressionCurveHelper::hasEquation( const Reference
< chart2::XRegressionCurve
> & xCurve
)
718 bool bHasEquation
= false;
721 uno::Reference
< beans::XPropertySet
> xEquationProp( xCurve
->getEquationProperties());
722 if( xEquationProp
.is())
724 bool bShowEquation
= false;
725 bool bShowCoefficient
= false;
726 xEquationProp
->getPropertyValue( C2U("ShowEquation")) >>= bShowEquation
;
727 xEquationProp
->getPropertyValue( C2U("ShowCorrelationCoefficient")) >>= bShowCoefficient
;
728 bHasEquation
= bShowEquation
|| bShowCoefficient
;
734 //.............................................................................
736 //.............................................................................