BCGSuite for MFC
CBCGPChartInterLineColoringEffect

Detailed Description

The CBCGPChartInterLineColoringEffect class implements a "chart effect", which fills a zone between two line series or between a line series and some horizontal line (origin) by a color.

The following picture illustrates two effect objects (the blue and red zones).

The first effect is created between blue an red series; the second effect is created between green and blue series.

To add an effect just construct a CBCGPChartInterLineColoringEffect object and call CBCGPChartVisualObject::AddChartEffect.

It is possible to fill intersection only when the first series is on top of the second series (m_bTopOnly is TRUE - the default, see the picture above), or also when the second series on top (m_bTopOnly is FALSE):

The following code creates interline coloring effect illustrated on the first picture:

Copy
CBCGPChartVisualObject* pChart = m_wndChart.GetChart();
// Create and add the first effect
m_pEffect_0_1 = new CBCGPChartInterLineColoringEffect(pChart, pChart->GetSeries(0), pChart->GetSeries(1));
m_pEffect_0_1->m_brTopBrush.SetColor(CBCGPColor::DodgerBlue, 0.5);
pChart->AddChartEffect(m_pEffect_0_1);
// Create and add the second effect
m_pEffect_2_0 = new CBCGPChartInterLineColoringEffect(pChart, pChart->GetSeries(2), pChart->GetSeries(0));
m_pEffect_2_0->m_brTopBrush.SetColor(CBCGPColor::Red, 0.5);
pChart->AddChartEffect(m_pEffect_2_0);
See also
CBCGPChartBaseEffect
+ Inheritance diagram for CBCGPChartInterLineColoringEffect:

Public Member Functions

 CBCGPChartInterLineColoringEffectConstructs an interline coloring effect object.
 
 CBCGPChartInterLineColoringEffectConstructs an interline coloring effect object.
 
 OnCalcScreenPointsCalled to calculate screen positions of lines used to draw the effect.
 
 OnDrawCalled by the framework to draw the effect.
 
- Public Member Functions inherited from CBCGPChartBaseEffect
 GetParentChartReturns a pointer to a parent chart.
 
 IsVisibleTells whether an effect is visible, or not.
 
 SetParentChartSets relation between Chart and effect.
 
 SetVisibleShows or hides an effect.
 

Public Attributes

 m_brBottomBrushA brush that uses to fill intersection between two series when the second series is on top of the first series.
 
 m_brTopBrushA brush that uses to fill intersection between two series when the first series is on top of the second series.
 
 m_bTopOnlySpecifies how to fill the intersection. If TRUE the intersection is filled only when the first series is on top of the second series. If FALSE in addition the intersection is filled when the second series is on top of the first series.