我正在尝试将滚动工具添加到我的图表中,但无法做到这一点。下面是代码
{
m_chart1.ClearChart();
m_chart1.GetPage().SetMaxPointsPerPage(5);
wchar_t tmp[30]={0};
wchar_t t[10] = L"T%d";
int i = 0;
m_chart1.AddSeries(1);
wsprintf(tmp,t,i);
m_chart1.Series(i).SetColor(RGB(rand(),rand(),rand()));
m_chart1.Series(i).SetLegendTitle(tmp);
m_chart1.Series(i).FillSampleValues(100);
m_chart1.Series(i).GetMarks().SetVisible(false);
m_chartNavigation.SetChartLink(m_chart1.GetChartLink());
m_chart1.GetAspect().SetView3D(false);
m_chart1.GetTools().Add(22);
_variant_t vardata;
VariantInit (&vardata);
vardata.vt = VT_BYREF;
vardata.byref = &m_chart1.GetAxis().GetBottom();
m_chart1.GetTools().GetItems(0).GetAsAxisScroll().SetAxis(vardata);
m_chart1.GetTools().GetItems(0).SetActive(true);
}
代码编译正确,但箭头未显示在 Axis 上。谢谢阿克谢