Bar Chart / Horizontal Bar Chart - Draw area problem

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Perbit
Newbie
Newbie
Posts: 10
Joined: Fri May 30, 2014 12:00 am

Bar Chart / Horizontal Bar Chart - Draw area problem

Post by Perbit » Mon Jul 14, 2014 4:54 pm

Hello TeeChart,

I'll show you the following Screenshots:

1.
Screen Problem Color-Lines.png
Screen Problem Color-Lines.png (16.79 KiB) Viewed 14349 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 14344 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

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Tue Jul 15, 2014 1:41 pm

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 14300 times
Could you please modify the code above (or arrange a simple example project) so we can reproduce the problem here?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Perbit
Newbie
Newbie
Posts: 10
Joined: Fri May 30, 2014 12:00 am

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

Post by Perbit » Thu Jul 17, 2014 12:44 pm

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);

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

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

Post by Narcís » Thu Jul 17, 2014 1:04 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply