Histogram and series position

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
webuser
Newbie
Newbie
Posts: 6
Joined: Thu Aug 17, 2006 12:00 am

Histogram and series position

Post by webuser » Mon Feb 09, 2009 5:16 pm

Hi,

I am having an issue with Histogram series in Teechart.net. The histogram series does not group data it just plots the individual values. An actual histogram should group data into different buckets. Should the user pre-process the data into buckets ?

The other issue I am having is, I am resizing all the chart axis using position,start and end to make the chart smaller to add additional custom axis. When I plot some data (point series) in the chart and zoom in the points are plotted out of chart bounds(outside the chart axis). Is there anyway I can avoid this ?

Thanks

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

Post by Yeray » Tue Feb 10, 2009 9:25 am

Hi webuser,

1. Please, could you take a look at the demo at "What's New ?\Welcome !\New Functions\Histogram Function" ?
I think that you are looking for the histogram property "NumBins".

2. You can force the points out of the ChartRect not to be drawn with the code:

Code: Select all

tChart1.Aspect.ClipPoints = true;
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

webuser
Newbie
Newbie
Posts: 6
Joined: Thu Aug 17, 2006 12:00 am

Post by webuser » Tue Feb 10, 2009 5:16 pm

Hi,

Thanks for the reply, however I am not able to resolve the out of bounds issue. I set the property tChart1.Aspect.ClipPoints to true but it still puts the points out of bounds when I zoom-in.

Thanks

webuser
Newbie
Newbie
Posts: 6
Joined: Thu Aug 17, 2006 12:00 am

Post by webuser » Tue Feb 10, 2009 6:11 pm

Hi Yeray,

Is this histogram function new in v3 of teechart.net ? I could not find it in the new features or demos. I was looking here

http://www.steema.com/products/teechart ... tures.html

Thanks,

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

Post by Yeray » Wed Feb 11, 2009 11:37 am

Hi webuser,

Yes, histogram function is a new feature in the 3rd version. So if you want to do an histogram with v2, I'm afraid you'll have to calculate the values and add them to the histogram series.

And regarding the other issue, I'm still not able to reproduce it here. So, please, could you send us a simple example project we can run "as-is" to reproduce the problem here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
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

webuser
Newbie
Newbie
Posts: 6
Joined: Thu Aug 17, 2006 12:00 am

Post by webuser » Wed Feb 11, 2009 4:31 pm

Hi Yeray,

Thanks for your reply. I have uploaded a demo project using your upload page. The issue is when you zoom in the points go out of axis bounds, what I have done in this demo is moved the axis around. The project has been uploaded under the name webuser and its a rar file (Tchart_sample1.rar).

The other question I have is does the latest java version of teechart have the histogram functionality ?

Thanks

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

Post by Yeray » Thu Feb 12, 2009 9:10 am

Hi webuser,

The problem is that you are drawing your axis inside the chart rectangle. Your example has a chart with something like this:

Code: Select all

tChart1.Axes.Left.RelativePosition = 37;
tChart1.Axes.Left.StartPosition = 13;
tChart1.Axes.Left.EndPosition = 84;

tChart1.Axes.Bottom.RelativePosition = 16;
tChart1.Axes.Bottom.StartPosition = 37;
tChart1.Axes.Bottom.EndPosition = 86;

tChart1.Walls.Back.Visible = false;
I recommend you to use the chart margins instead of changing the axes positions. Something like the following code ends in a similar result than before and it changes the chartrect so the clippoints work fine:

Code: Select all

tChart1.Walls.Back.Visible = false;

tChart1.Panel.MarginBottom = 10;
tChart1.Panel.MarginTop = 10;
tChart1.Panel.MarginLeft = 20;
tChart1.Panel.MarginRight = 20;
And regarding the other question, yes, teechart java v2 has histogram function.
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

Post Reply