【问题标题】:Teechart space evently of the point series点系列的 Techart 空间
【发布时间】:2014-02-06 16:20:18
【问题描述】:

我正在使用 Teechart 绘制一些点系列,但 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;

}

【问题讨论】:

    标签: activex teechart


    【解决方案1】:

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

    【讨论】:

    • 感谢您回答我的问题。我将更改源代码并能够在图表周围的背景中绘制自定义图表。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多