Teechart空间最终点系列

时间:2014-02-06 16:20:18

标签: activex teechart

我正在使用Teechart绘制一些点序列,但Teechart图的默认画布显示为拉伸整个区域。我想在Axis和绘图点系列之间添加边距。所以,它看起来与窗口成正比。

此处示例代码:

    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;

}

1 个答案:

答案 0 :(得分:0)

您可以在TeeChart程序组提供的功能演示中执行 All Features \ Welcome!\ Axes \ Isometric Axes 示例。 Here你会找到一个关于如何在Visual C ++中获取画布句柄的例子。如果这不是您想要的,请提供更详细的信息。