문제

I have a problem using IGraphics3D in a tChart. I can draw any type of picture over the tChart, but when I try to export the image using getImage() to a file the drawings disappear. These pictures also disappears when I click with the mouse over the Chart. I'm using the "com.steema.teechart.tools.Annotation" also and that it works how I want. However I don't know why the Graphics3D have a different behaviour.

I copy the code that shows how I create the drawings:

IGraphics3D grafics = tChart.getGraphics3D();
grafics.getPen().setColor(liniaGrafica.getColorLinia());
Series serie = tChart.getSeries(liniaGrafica.getIndexSerie());
grafics.line(X1, Y, X2, Y);

Can anyone help me with that doubt.

Thank you in advance.

올바른 솔루션이 없습니다

다른 팁

Note you have to call the custom drawing routines at the chartPainted event. Here you have an example:

private static void initializeChart() {
    tChart1.getAspect().setView3D(false);
    Area area1 = new Area(tChart1.getChart());
    area1.fillSampleValues(100);

    tChart1.addChartPaintListener(new ChartPaintAdapter() {
        @Override
        public void chartPainted(ChartDrawEvent e) {
            IGraphics3D grafics = tChart1.getGraphics3D();
            grafics.getPen().setColor(tChart1.getSeries(0).getColor());
            grafics.line(0, 0, 100, 100);
        }
    });  
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top