Line series data in tabular format

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Line series data in tabular format

Post by BenW » Mon Oct 13, 2008 10:00 pm

Hi.

Each line series has a DataSource property, which can be accessed to obtain the Dataset of associated values. This dataset can then be 'fed' to a DataGridView to display the chart series data in tabular format.

Is there a more 'automatic/dynamic' manner in which a chart series data can be dislayed in tabular format - perhaps without having to involve any other .NET control?

Also note that when new data arrives in a series, and I 're-get' the associated DataSource and feed that into the DataGridView control again, the new samples that were added to the chart series since I obtained the DataSet the first time around, are not displayed in the DataGridView. Is there something else I need to do in order to obtain the DataSet from the chart series with the latest data?

thanks!
Ben.

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

Post by Narcís » Wed Oct 15, 2008 10:14 am

Hi Ben,

This can already be done as shown in the What's New?\Welcome !\New Chart Tools\Data Table example at the features demo, available at TeeChart's program group.

An alternative would be doing what's shown in the All Features\Welcome !\Components\Chart Grid example.
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

BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Post by BenW » Thu Oct 16, 2008 11:46 pm

Hi Narcís,

I hope you are well.

Sadly, I don't see those categories under "What's New?" and "All Features". Is this something that is not supported under V2.0 ?

Regards,
Ben.

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

Post by Narcís » Fri Oct 17, 2008 8:17 am

Hi Ben,

DataTable tool was implemented for v3 and therefore is not available in v2. However the Chart Grid example is already available in v2.

Have you found the features demo? You should find it at the start menu -> all programs -> Steema TeeChart for .NET v2 -> Feature demo.
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

BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Post by BenW » Sun Oct 19, 2008 5:55 am

Hi Narcís,

On the version of the Features Demo that I have installed, under All Features->Welcome!->Components, I only see the following options/examples:

Chart Listox
Commander
Gallery
Text Source
XML Import Source

... there is no option for Chart Grid.

Is it possible you can point me to the Chart Grid example via an alternate link?

thanks,
Ben.

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

Post by Narcís » Tue Oct 21, 2008 8:56 am

Hi Ben,

Can you please try downloading latest TeeChart for .NET v2 maintenance release available at the client area?

Thanks in advance.
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

BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Post by BenW » Tue Oct 21, 2008 5:41 pm

Hi Narcís.

I've downloaded and installed the latest V2.0 release (Oct 8, 2008). The Feature Demo did not get installed, so can you let me know where I can grab this from so that I can look at the Chart Grid example...

thanks,
Ben.

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

Post by Narcís » Wed Oct 22, 2008 8:05 am

Hi Ben,

Sorry if my explanation wasn't clear enough. 8th October releases is an update build, not a full maintenance release. Last full version release is 6th March 2008. Could you please try downloading this version?

Thanks in advance.
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

BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Post by BenW » Wed Oct 22, 2008 4:34 pm

OK thanks Narcís - got it...

Narcís, is there anyway of me taking a look at the V3 DataTable tool (say obtaining just the V3 Feature Demo application), so that I can compare this solution against the V2 capability?

Ben.

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

Post by Narcís » Thu Oct 23, 2008 7:07 am

Hi Ben,

You can download TeeChart for .NET v3 fully functional evaluation version here:

http://www.steema.com/downloads/form_tch_net.html
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

BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Post by BenW » Fri Oct 24, 2008 4:20 am

OK, thanks Narcís.

I have another enhancement I need to make and it involves being able to allow users to specify the font for X and Y axis labels. In our implementation, we have a maximum of 6 y-axes and 2 timescales (x-axes) that can be configured. Before the font requirement, we could use fixed constants to adjust the relative positions of the y-axes so that they could be spaced far enough apart from each other, for aesthetics (i.e. ensuring labels don't overlap with adjacent axes, etc). Now, allowing the user to configure the font for the labels on each axis, means that the spacing algorithm now needs to take into account the size of the labels and axis tick lengths, based on the font the user has conifigured. Do you recommend using Graphics.MeasureString(...) or the TextRenderer.MeasureText(...) mechanisms for calculating the gap (in pixels?) required between the multiple axes, or is there another method/technique you can recommend, in order to establish a perdictable and consistent multiple axis spacing algorithm?

Note, right now I'm using the following 'basic' mechanism to space the multiple y-axes

const int cEXTRA_MARGIN = 18;
const int cEXTRA_POS = 36;
const int cYAXIS_MAX_LABEL_SIZE = 50;

foreach (YAxis y in this.chartControl.YAxes)
{
DNAAxis yAxis = y.Axis;
if (yAxis != null &&
yAxis.Axis != null)
{
yAxis.Axis.PositionUnits = Steema.TeeChart.PositionUnits.Pixels;
yAxis.Axis.RelativePosition = nextLeft;
yAxis.Axis.Labels.CustomSize = cYAXIS_MAX_LABEL_SIZE;
nextLeft = nextLeft - cYAXIS_MAX_LABEL_SIZE - yAxiss.Axis.Ticks.Length - cEXTRA_POS;
this.tChart.Panel.MarginLeft = (-1 * nextLeft);
yAxis.Axis.StartPosition = 0;
yAxis.Axis.EndPosition = chartRect.Height;
yAxis.Axis.Visible = true;
}
}


Ben.

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

Post by Narcís » Fri Oct 24, 2008 8:19 am

Hi Ben,

Yes, using MeasureString or TextWidth methods would be the way for calculating precise labels size.
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