0
我使用Teechart繪製一些點系列,但Teechart圖形的默認畫布顯示爲拉伸整個區域。我想在Axis和繪圖點系列之間添加邊距。所以,它看起來與窗口成正比。點圖系列中的Teechart空間事件性問題
下面示例代碼:
m_ptChart->GetWalls()->GetBack()->PutTransparent(FALSE);
m_ptChart->GetWalls()->GetBack()->PutColor(RGB(255, 255, 255));
m_ptChart->GetZoom()->GetPen()->PutColor(RGB(0, 0, 0));
m_ptChart->SetTheme(tchartNS::ctDefault, tchartNS::cpSolid);
// Setup Drawing canvas
m_ptChart->GetCanvas()->PutUseAntiAlias(VARIANT_TRUE);
m_ptChart->GetCanvas()->PutUseBuffer(VARIANT_TRUE);
m_ptChart->GetAxis()->GetTop()->Maximum = (double)MaxPoints();
m_ptChart->GetAxis()->PutDrawAxesBeforeSeries(VARIANT_TRUE);
}
// Add some series into the chart
for (int i = 0; i < 12; i++)
{
m_ptChart->AddSeries(scPoint);
m_ptChart->Series(i)->Add(i*2, _T("Test1"), RGB(255 - i, 34, 128));
m_ptChart->Series(i)->Add(i * 2, _T("Test2"), RGB(153 - i, 232, 173));
m_ptChart->Series(i)->asPoint->GetPointer()->PutStyle((EPointerStyle)i);
m_ptChart->Series(i)->asPoint->GetPointer()->VerticalSize = 10;
m_ptChart->Series(i)->asPoint->GetPointer()->HorizontalSize = 10;
}
謝謝你回答我的問題。我將做出源代碼更改,並能夠在圖形圖的背景中繪製自定義圖形。 – user3280398