BCGControlBar Pro for MFC
void CBCGPChartVisualObject::SetChartType ( BCGPChartCategory  category,
BCGPChartType  type = BCGP_CT_SIMPLE,
BOOL  bRedraw = TRUE,
BOOL  bResetAxesDisplayRange = TRUE 

Sets Chart category and type.

Call this method to set a new Chart category and / or type.

All series that are created indirectly using CreateSeries() or GetSeries(nIdx, TRUE) get the category and type you specify in category and type.

All series that have been created prior this call are recreated (if possible - for example, stock series can't be converted) with the new category and type.

category can be one of the following enumerated values:

  • BCGPChartLine,
  • BCGPChartPie,
  • BCGPChartPie3D,
  • BCGPChartPyramid,
  • BCGPChartPyramid3D,
  • BCGPChartFunnel,
  • BCGPChartFunnel3D,
  • BCGPChartColumn,
  • BCGPChartBar,
  • BCGPChartHistogram,
  • BCGPChartArea,
  • BCGPChartStock,
  • BCGPChartBubble,
  • BCGPChartLongData,
  • BCGPChartHistoricalLine,
  • BCGPChartPolar,
  • BCGPChartDoughnut,
  • BCGPChartDoughnut3D,
  • BCGPChartTorus3D,
  • BCGPChartTernary,
  • BCGPChartColumn3D,
  • BCGPChartBar3D,
  • BCGPChartLine3D,
  • BCGPChartArea3D,
  • BCGPChartSurface3D,
  • BCGPChartDoughnutNested,

type can be one of the following enumerated values:

  • BCGP_CT_DEFAULT - default type - do not change
  • BCGP_CT_SIMPLE - simple type (for regular line, bar area series)
  • BCGP_CT_STACKED - stacked type (stacked lines, bars, area)
  • BCGP_CT_100STACKED - full (normalized to 100%) stacked type (full stacked lines, bars, area)
  • BCGP_CT_RANGE - range type (range bars and area).

It's recommended to call this method with the desired chart category once before you create the first series. If you need to place different series on the same diagram, construct the series directly (with operator new) and call AddSeries().

If you don't call SetChartType(), the default series is BCGPChartLine.

categorySpecifies the new Chart category.
typeSpecifies the new chart type.
bRedrawTRUE - redraw the chart immediately.
bResetAxesDisplayRangeTRUE - reset display range for all axes.