Page 1 of 1
Line series data in tabular format
Posted: Mon Oct 13, 2008 10:00 pm
by 9787981
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.
Posted: Wed Oct 15, 2008 10:14 am
by narcis
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.
Posted: Thu Oct 16, 2008 11:46 pm
by 9787981
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.
Posted: Fri Oct 17, 2008 8:17 am
by narcis
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.
Posted: Sun Oct 19, 2008 5:55 am
by 9787981
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.
Posted: Tue Oct 21, 2008 8:56 am
by narcis
Hi Ben,
Can you please try downloading latest TeeChart for .NET v2 maintenance release available at the client area?
Thanks in advance.
Posted: Tue Oct 21, 2008 5:41 pm
by 9787981
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.
Posted: Wed Oct 22, 2008 8:05 am
by narcis
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.
Posted: Wed Oct 22, 2008 4:34 pm
by 9787981
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.
Posted: Thu Oct 23, 2008 7:07 am
by narcis
Hi Ben,
You can download TeeChart for .NET v3 fully functional evaluation version here:
http://www.steema.com/downloads/form_tch_net.html
Posted: Fri Oct 24, 2008 4:20 am
by 9787981
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.
Posted: Fri Oct 24, 2008 8:19 am
by narcis
Hi Ben,
Yes, using MeasureString or TextWidth methods would be the way for calculating precise labels size.