Page 1 of 1

Get Nogrid Option with a ColorGrid

Posted: Sun Jan 09, 2005 10:25 am
by 9083172
Hello

I use visual C++ and TChart 6,I would like to get "NoGrid" option from the C++ code,I don't find the way to do that

Thanks for help

Pascal

Posted: Mon Jan 10, 2005 9:15 am
by narcis
Hello Pade,

You have to include the includes:

Code: Select all

#include "TeeChartDefines.h"
#include "Series.h"
#include "Axis.h"
#include "Axes.h"
#include "Pen.h"
and the code:

Code: Select all

m_Chart1.GetAxis().GetLeft().GetGridPen().SetVisible(false);
m_Chart1.GetAxis().GetBottom().GetGridPen().SetVisible( false);

Posted: Mon Jan 10, 2005 10:35 am
by 9083172
Thanks you very much,

Pascal

Pb with Nogrid option in ColorGrid Chart

Posted: Mon Jan 10, 2005 11:59 am
by 9083172
Hello Narcis

I've tried the code but it seems that it doesn't do what I would like
(may there is an other declaration)

the chart I want to get is (VBexample:Chart->Add->ColorGrid->NoGrid)

when I add the two lines you wrote it still draw vertical and horizontal line in the ColorGrid

Thank for Help

Pascal

Posted: Mon Jan 10, 2005 12:07 pm
by Pep
Hi Pascal,

to hide the vertical and horiz. lines you can do :
,_Chart1.Series(0).getAsColorGrid().GetPen().setVisible(false);

Posted: Mon Jan 10, 2005 7:59 pm
by 9083172
Thanks very much Josep

Pascal