Jump to content
Software FX Community

How to clear the previous ConstantLines


User (Legacy)
 Share

Recommended Posts

Hi,

Depending on the condition switched by the user, I want to display

constant lines or not (see the hide_lines_condition below):

m_spChartFX->OpenDataEx(ChartfxLib::COD_CONSTANTS, 0,

ChartfxLib::COD_UNKNOWN);

m_spChartFX->CloseData(ChartfxLib::COD_CONSTANTS);

if (hide_lines_condition)

return;

m_spChartFX->OpenDataEx(ChartfxLib::COD_CONSTANTS, 1,

ChartfxLib::COD_UNKNOWN);

m_spChartFX->ConstantLine->Item[0]->Axis = ChartfxLib::AXIS_X;

m_spChartFX->ConstantLine->Item[0]->Value = dValue;

... etc. ...

m_spChartFX->CloseData(ChartfxLib::COD_CONSTANTS);

When the user switches the lines on, the line appears. When he switches

the lines off, the line remains displayed. In other words, the first two

lines do not erase the existing line(s) -- the zero lines does not do that.

How should I erase it?

Similarly, it holds for showing/hiding stripes.

I am using Cfx4032.dll, ver. 5.0.14.1 from within the C++ application

Thanks for your time and experience.

Petr

--

Petr Prikryl (prikrylp at skil dot cz)

Link to comment
Share on other sites

Prety easy, as the great things often are ;-)

m_spChartFX->ClearData(ChartfxLib::CD_CONSTANTLINES);

m_spChartFX->ClearData(ChartfxLib::CD_STRIPES);

Petr

"Petr Prikryl" <prikrylp at skil dot cz> wrote in message

news:AMRLRqFlGHA.1788@webserver3.softwarefx.com...

> Hi,

>

> Depending on the condition switched by the user, I want to display

> constant lines or not (see the hide_lines_condition below):

>

> m_spChartFX->OpenDataEx(ChartfxLib::COD_CONSTANTS, 0,

> ChartfxLib::COD_UNKNOWN);

> m_spChartFX->CloseData(ChartfxLib::COD_CONSTANTS);

>

> if (hide_lines_condition)

> return;

>

> m_spChartFX->OpenDataEx(ChartfxLib::COD_CONSTANTS, 1,

> ChartfxLib::COD_UNKNOWN);

> m_spChartFX->ConstantLine->Item[0]->Axis = ChartfxLib::AXIS_X;

> m_spChartFX->ConstantLine->Item[0]->Value = dValue;

> ... etc. ...

> m_spChartFX->CloseData(ChartfxLib::COD_CONSTANTS);

>

> When the user switches the lines on, the line appears. When he switches

> the lines off, the line remains displayed. In other words, the first two

> lines do not erase the existing line(s) -- the zero lines does not do

that.

> How should I erase it?

>

> Similarly, it holds for showing/hiding stripes.

>

> I am using Cfx4032.dll, ver. 5.0.14.1 from within the C++ application

>

> Thanks for your time and experience.

> Petr

>

>

> --

> Petr Prikryl (prikrylp at skil dot cz)

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...