在我的代码中有这样的要求,当用户点击一个系列的条形图时,系列的CheckBox样式应该改为none.But,当我这样做的时候,我的图表宽度是增加的。我们有没有办法保持图表宽度的固定,而不管图例表的宽度。
谢谢Akshay
发布于 2013-10-17 20:18:42
将图例对齐设置在底部,以避免图表的宽度增加,如下所示。Chart.GetLegend().SetAlignment(laBottom);
如果你想要自定义图例的位置(图表的右侧),那么你可以这样做。M_Chart1.GetLegend().SetCustomPosition(真);
m_Chart1.GetLegend().SetPositionUnits(muPercent);
long long m_Chart1.GetLegend().SetLeftPercent(leftmargin = 80.0;m_Chart1.GetLegend().SetTopPercent(20);
m_Chart1.GetPanel().SetMarginRight(100-leftmargin+1);//for避免图例和图表重叠也可以通过修改上面的值来微调图例和图表
发布于 2013-10-17 21:01:26
这是可以做到的
GetLegend().SetResizeChart(false);
GetLegend().SetCustomPosition(true);
GetLegend().SetPositionUnits(muPercent);
GetLegend().SetLeftPercent(83);
GetLegend().SetTopPercent(10);https://stackoverflow.com/questions/19399680
复制相似问题