2013-10-16 54 views
0

在我的代碼中,當用戶點擊系列的酒吧時,系統的複選框樣式應該改爲無。但是當我這樣做時,我的圖表寬度正在增加。有沒有什麼辦法可以保持圖表的寬度,而不考慮圖表的寬度。Teechart傳奇風格

感謝 阿克沙伊

回答

1

設置你的傳奇對準在底部,如下圖避免的寬度增量。 Chart.GetLegend()。SetAlignment(laBottom);

如果你想要圖例的自定義位置(圖表的右側),那麼你可以做如下。 m_Chart1.GetLegend()。SetCustomPosition(TRUE);

m_Chart1.GetLegend()。SetPositionUnits(muPercent);

m_Chart1.GetLegend()。SetTopPercent(20); long leftmargin = 80.0; m_Chart1.GetLegend()。SetLeftPercent(leftmargin); 。

m_Chart1.GetPanel()SetMarginRight(100-LEFTMARGIN + 1); //用於避免說明和圖表 另外的重疊可以通過上述值

1

修改微調圖例和圖表可以做到這一點

GetLegend().SetResizeChart(false); 
    GetLegend().SetCustomPosition(true); 
    GetLegend().SetPositionUnits(muPercent); 
    GetLegend().SetLeftPercent(83); 
    GetLegend().SetTopPercent(10);