Page 1 of 1
End user XY charts
Posted: Mon Aug 25, 2008 10:02 pm
by 9232061
Hello,
We are using the end-user chart designer (TChartEditor) for the creation of line and bar DBCharts, TChart v7.04.
Our x-axis values are non-sequential non-linear year values, e.g. 2002;2005;2020. When the chart is drawn, the x-axis displays the years as they are in the dataset, so the above example would be 2002;2005;2020. We want it to draw them in an XY fashion, so the above example would be 2002;2009;2020 or something similar.
I understand the AddXY method would be used in code to do this, how is it accomplished using TChartEditor?
Many thanks for any help.
Posted: Tue Aug 26, 2008 8:38 am
by narcis
Hi Doug,
I'm not sure about what you are trying to do but using chart editor you should set bottom axis increment. For more information on how to do that please read Tutorial 4 - Axis Control. Tutorials can be found at TeeChart's "Docs" folder.
Also please notice that much newer releases of TeeChart v7 are available at the client download area.
Hope this helps!
Posted: Tue Aug 26, 2008 7:59 pm
by 9232061
Thanks for replying,
Basically we are trying to get an end-user XY chart. Is there a specific chart type from the gallery we need, or a property that needs to be set? I've tried changing the increment, but nothing quite seems to work.
I'll try the updates. Thanks again.
Posted: Tue Aug 26, 2008 9:27 pm
by 10047009
1) Double click on selected series.
2) In Data Source Tab select Random let Num pts = 3
Then change to manual in the drop down list
3) Go to Data in main Tree of Chart Editor.
4) make sure the "X" Button bottom right corner is engaged.
5) No enter desired X Y Values.
6) From what I understand x's would be 1,2,3 and y values corresponding dates.
7) You can also set the Left axis to datetime in the series General tab.
This Tchart is Cool.
Regards
Lucien
Posted: Wed Aug 27, 2008 8:17 am
by yeray
Hi Lucien,
The following example is to show you could disable all the editor tabs except the
SeriesData, so that the user will only see this tab and change series data.
Code: Select all
uses TeeEditCha;
procedure TForm1.Button1Click(Sender: TObject);
var HidenTabs: TChartEditorHiddenTabs;
begin
HidenTabs := [cetMain, cetGeneral, cetAxis, cetTitles, cetLegend, cetPanel, cetPaging, cetWalls, cet3D, cetSeriesGeneral, cetSeriesMarks, cetAllSeries, cetExport, cetExportNative, cetTools, cetPrintPreview];
ChartEditor1.HideTabs := HidenTabs;
ChartEditor1.Execute;
end;
Re: End user XY charts
Posted: Mon Jun 22, 2009 8:21 pm
by 9232061
Hi there,
We are still having the problem. Maybe I can explain it a bit better now, with the right terminology.
Basically, is it possible to have date/time x-axis interpolated when using a TDBCrossTab series datasource? As an example, a dataset has the following values:
Time, Product, Sales
2010, "Coke", 100
2011, "Coke", 20
2012, "Coke", 150
2040, "Coke", 55
2010, "7up", 200,
2011, "7up", 22
2012, "7up", 133
2040, "7up", 87
So the time values jump from 2010 to 2040. Our DBCrosstab chart is fine except the values on the x-axis are 2010, 2011, 2012 and 2040 evenly spaced. We need the chart to show something like 2010, 2010, 2020, 2030, 2040 on the x-axis, automatically interpolating the intervening time years. Is this possible? The series type we are using is TAreaSeries.
Many thanks for any help.
Doug
Re: End user XY charts
Posted: Tue Jun 23, 2009 10:07 am
by yeray
Hi Doug,
Probably your solution will be using custom labels in your bottom axis. But, if you would like a more accurately suggestion, please, try to reproduce the issue in a project (as simple as possible) we can run as-is here and attach it in this forums and we'll try to tell you what's happening.