zoukankan      html  css  js  c++  java
  • 使用BCG创建Pie

    1.新建一个BCG的对话框,添加一个文本框,并修改属性,添加成员变量,并设置Category为Control。

    2.在class CCharPieDlg : public CBCGPDialog修改文本框成员为CBCGPChartCtrlm_wndChart;和添加BOOLm_bShowDataLabels;

    3.在BOOL CCharPieDlg::OnInitDialog()添加如下代码

     1 m_wndChart.EnableTooltip();  
     2 CBCGPChartVisualObject* pChart = m_wndChart.GetChart();  
     3 pChart->SetChartType(BCGPChartPie);  
     4   
     5 pChart->SetChartTitle(_T("ABCD"));  
     6 pChart->AddChartData(_T("A"), 2000);  
     7 pChart->AddChartData(_T("B"), 2000);  
     8 pChart->AddChartData(_T("C"), 2000);  
     9 pChart->AddChartData(_T("D"), 2000);  
    10 m_bShowDataLabels = TRUE; //定义是否展示数据Label  
    11 OnUpdateChart();  

    4.添加OnUpdateChart();

    1 UpdateData();  
    2 CBCGPChartVisualObject* pChart = m_wndChart.GetChart();  
    3 pChart->ShowDataLabels(m_bShowDataLabels);//pie细节Label展示  
    4 pChart->Redraw();  
  • 相关阅读:
    scala-for高级用法
    scala-for
    numpy每行,没列中的最小值
    NLP
    sql-server笔记-sql
    openlayers加载geoserver的WMS服务出现点标注显示不全
    oracle删除表
    idea-debug
    python-windows安装相关问题
    mybatis-oracle 新增序列
  • 原文地址:https://www.cnblogs.com/lpxblog/p/6510205.html
Copyright © 2011-2022 走看看