I am using Teechart to draw some point series, but the default canvas of the Teechart graph shown to be stretch entire area. I would like to add margin between Axis and plot point series. So, it look proportional to the window.
Here sample codes:
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;
}