MFC使用ChartCtrl绘制柱状图,希望在柱状图上方显示对应数字,如图。
但气泡只能显示在中间的柱上方,不能对应到每个柱上,代码如下,应该怎么修改?
CString f;
CChartFont labelFont;
labelFont.SetFont(_T("Arial"), 60, false, true, false);
CChartBalloonLabel<SChartXYPoint>* pLabel[3];
f.Format("%.f", pBarSerie0->GetPoint(0).GetY());
pLabel[0] = pBarSerie0->CreateBalloonLabel(0, GetThousands(f).GetBuffer());
pLabel[0]->SetFont(labelFont);
f.Format("%.f", pBarSerie1->GetPoint(0).GetY());
pLabel[1] = pBarSerie1->CreateBalloonLabel(0, GetThousands(f).GetBuffer());
pLabel[1]->SetFont(labelFont);
f.Format("%.f", pBarSerie2->GetPoint(0).GetY());
pLabel[2] = pBarSerie2->CreateBalloonLabel(0, GetThousands(f).GetBuffer());
pLabel[2]->SetFont(labelFont);