Page 1 of 1

Bar Chart / Horizontal Bar Chart - Draw area problem

Posted: Mon Jul 14, 2014 4:54 pm
by 17069345
Hello TeeChart,

I'll show you the following Screenshots:

1.
Screen Problem Color-Lines.png
Screen Problem Color-Lines.png (16.79 KiB) Viewed 12984 times
Here you see, that when I scroll in the chart, the color-lines are getting over the drawing-area-bounds (see marked inside the red box). Is it an bug, or am I able to disable this?

2.
Screen Problem Chart over Bounds.png
Screen Problem Chart over Bounds.png (19.97 KiB) Viewed 12979 times
Here you see, that I need to have a chart, that is bigger than it is possible to show bars (because the place is very limited, where I draw the chart). The next bars (not able to be shown) should be able to be reached by scrolling. But you see, that the Chart-Axes are to big. As next you see in the red box, that the raster of the chart (name "2012") exceed the border of the drawing-area.
Is it possbile to get it cleanly?

I hope you understand what I mean.

Thank you very much,
Perbit

Re: Bar Chart / Horizontal Bar Chart - Draw area problem

Posted: Tue Jul 15, 2014 1:41 pm
by yeray
Hello Perbit,
Perbit wrote:1.

Here you see, that when I scroll in the chart, the color-lines are getting over the drawing-area-bounds (see marked inside the red box). Is it an bug, or am I able to disable this?
This sounds the same discussed here:
http://www.teechart.net/support/viewtop ... 10&t=10658
Perbit wrote:2.

Here you see, that I need to have a chart, that is bigger than it is possible to show bars (because the place is very limited, where I draw the chart). The next bars (not able to be shown) should be able to be reached by scrolling. But you see, that the Chart-Axes are to big. As next you see in the red box, that the raster of the chart (name "2012") exceed the border of the drawing-area.
Is it possbile to get it cleanly?
I'm trying to reproduce this with the following code and TeeChart Java Swing and the following code, but it seems to work fine for me here:

Code: Select all

        tChart1.getAspect().setView3D(false);
        tChart1.getLegend().setVisible(false);
        
        for(int i=0; i<3; i++) {
            HorizBar bar1 = new HorizBar(tChart1.getChart());
            bar1.fillSampleValues();
            bar1.setCustomBarWidth(20);
        }
        
        tChart1.getAxes().getLeft().setMinMax(-0.5, 2.5);
2014-07-15_1540.png
2014-07-15_1540.png (10.28 KiB) Viewed 12935 times
Could you please modify the code above (or arrange a simple example project) so we can reproduce the problem here?

Re: Bar Chart / Horizontal Bar Chart - Draw area problem

Posted: Thu Jul 17, 2014 12:44 pm
by 17069345
The problem is for me, that the Chart have to be bigger than bars can be displayed. Because there are to many bars for so little space. That's the reason why I have to upsize the "Left"-Axis. The upsized Axis is to big for the Draw-Area.

Is there no way to make the chart bigger than the shown draw-Area and make the rest reached by scrolling? So that the Axes don't get out of the actual area-bounds?

Some pieces of my code:

Code: Select all

bar_chart.getAxes().getLeft().setAutomatic(true);
		bar_chart.getAxes().getLeft().setAutomaticMinimum(true);
		bar_chart.getAxes().getLeft().setAutomaticMaximum(true);
		bar_chart.getAxes().getLeft().setStartPosition(-50);
		bar_chart.getAxes().getLeft().setEndPosition(100);
		bar_chart.getAxes().getLeft().setMinimum(0);

Re: Bar Chart / Horizontal Bar Chart - Draw area problem

Posted: Thu Jul 17, 2014 1:04 pm
by narcis
Hi Perbit,
Perbit wrote: Is there no way to make the chart bigger than the shown draw-Area and make the rest reached by scrolling? So that the Axes don't get out of the actual area-bounds?
Yes, by default TeeChart can be scrolled with the right mouse button as explained in Tutorial 8. Tutorials can be found at "Docs" folder included with the TeeChart installation.

Also, you can use Axis Arrows tool. There's an example at All Features\Welcome!\Tools\Axis Arrows in the TeeChart.Features.jar demo included with the installation as well.

If this doesn't solve the problem please modify Yeray's example or create another simple example project we can run "as-is" to reproduce the problem here.