cant access 3D components in series editor

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Sunshine
Newbie
Newbie
Posts: 4
Joined: Fri Sep 12, 2008 12:00 am

cant access 3D components in series editor

Post by Sunshine » Mon Oct 22, 2012 2:31 pm

Hi,
I have Teechart pro installed, & I can see it in Component>install packages

I want to use the TPolarGrid component, but when I go into Tchart gallery>3D I get a 'no-entry' symbol as my mouse pointer, when I hover over all the 3D series types.

any advice on what schoolboy error I am committing would be very appreciated.

cheers, Brian

Sunshine
Newbie
Newbie
Posts: 4
Joined: Fri Sep 12, 2008 12:00 am

Re: cant access 3D components in series editor

Post by Sunshine » Mon Oct 22, 2012 3:31 pm

I think I'm getting closer to the root of the problem,
SeriesType_PolarGrid.pas is actually in the teechart not teechart pro folder of c: program files

but when I add SeriesType_PolarGrid.pas

[DCC Fatal Error] Project1.dpr(6): F1026 File not found: 'Base.dcu'

So what I've ended up doing is creating a test project with the following units manually:
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Base in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\Base.pas' {BaseForm},
TeeGDIPlus in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\TeeGDIPlus.pas',
GDIPOBJ in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\GDIPOBJ.pas',
GDIPAPI in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\GDIPAPI.pas',
SeriesType_PolarGrid in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\SeriesType_PolarGrid.pas' {SeriesTypePolarGrid};

Which I'm sure is the least elegant or sensible solution.
This seems to be an issue to do with using units from tchart OR tchart pro but not both?

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

Re: cant access 3D components in series editor

Post by Yeray » Tue Oct 23, 2012 10:30 am

Hi Brian,
Sunshine wrote:I want to use the TPolarGrid component, but when I go into Tchart gallery>3D I get a 'no-entry' symbol as my mouse pointer, when I hover over all the 3D series types.

any advice on what schoolboy error I am committing would be very appreciated.
I can't see any error or problem when I move the mouse over the 3D tab in the series gallery at design time nor at runtime.
Using TeeChart v8.08 in Delphi 2010.
v8Gallery3DTab.png
v8Gallery3DTab.png (35.16 KiB) Viewed 6404 times
Could you please show us an screen shot of the problem?
Sunshine wrote:I think I'm getting closer to the root of the problem,
SeriesType_PolarGrid.pas is actually in the teechart not teechart pro folder of c: program files

but when I add SeriesType_PolarGrid.pas

[DCC Fatal Error] Project1.dpr(6): F1026 File not found: 'Base.dcu'

So what I've ended up doing is creating a test project with the following units manually:
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Base in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\Base.pas' {BaseForm},
TeeGDIPlus in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\TeeGDIPlus.pas',
GDIPOBJ in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\GDIPOBJ.pas',
GDIPAPI in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\GDIPAPI.pas',
SeriesType_PolarGrid in 'C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features\SeriesType_PolarGrid.pas' {SeriesTypePolarGrid};

Which I'm sure is the least elegant or sensible solution.
This seems to be an issue to do with using units from tchart OR tchart pro but not both?
Here you are adding a reference to an example in the features demo. Maybe you should just add some of the references in this unit:

Code: Select all

uses
  //...
  Base, TeeProcs, TeEngine, Chart, Series, TeCanvas,
  TeePenDlg, TeePolarGrid, TeePolar;
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

Sunshine
Newbie
Newbie
Posts: 4
Joined: Fri Sep 12, 2008 12:00 am

Re: cant access 3D components in series editor

Post by Sunshine » Thu Oct 25, 2012 2:46 pm

Hi Yeray,
thanks for your advice, that was very helpful, Most of the units were added automatically when I copied the polar grid to my form, except: Base, TeCanvas & TeePenDlg,
My plot is now working very well, with the exception of the color palette options,
The graph itself is not visible at runtime, until I fill some sectors with 'AddCell'
which is ok, but my big problem is that the palette seems to reset itself at runtime.
Even if I apply my preferences at runtime with commands including:
with PolarGrid do begin
Palette.UsePalette := True;
Palette.UseColorRange := True;
Palette.PaletteMin := 10;
Palette.UsePaletteMin := True;
Palette.PaletteSteps := 30; // number of different colour steps
polarGrid.Palette.PaletteSteps := 1; // increment of each step
end; //

they seem to be ignored, I just get a single colour and PaletteSteps := 1 etc default values

the only way I can get the color range is to open the editor at runtime using EditSeries(Self, PolarGrid);

any suggestions to fix this problem would be most appreciated,
many thanks, Brian

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

Re: cant access 3D components in series editor

Post by Yeray » Fri Oct 26, 2012 2:02 pm

Hi Brian,

Have you tried using a custom palette like in the example at "All features\Welcome !\Aspect\Custom Palettes"?
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

Sunshine
Newbie
Newbie
Posts: 4
Joined: Fri Sep 12, 2008 12:00 am

Re: cant access 3D components in series editor

Post by Sunshine » Fri Oct 26, 2012 3:14 pm

Yeray,
thanks again,
I dont seem to have a 'custom palette' unit in Tchart pro V8.08?
doesn't appear here:
C:\Program Files\Steema Software\TeeChart 8.08 for Delphi 2010\Examples\Features
or here
http://www.steema.net/teechartdocs/teec ... ntent.html
maybe that's the problem?
If I navigate to Editor>PolarGrid>Format>Palette>Palette>COlors>
the custom palettes dropdown box is initially greyed out, when I click new it fill swith color options, but again the selected option isn't retained at runtime.

Brian

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

Re: cant access 3D components in series editor

Post by Yeray » Fri Nov 02, 2012 8:11 am

Hi Brian,

I've seen the "New..." button in the "Palette/Colors" Tab in TeeGriEd.dfm executes a quite large code.
Since you are a source code customer, you could try to extract the code yourself and do the same in your application.
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

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

Re: cant access 3D components in series editor

Post by Yeray » Tue Nov 06, 2012 3:45 pm

Hi Brian,

Let me add some extra comments to the above.

If you want to define the PaletteSteps to use, you'll have to work with a Palette, not with a ColorRange.
This works fine with a TSurfaceSeries;

Code: Select all

uses TeeSurfa;

procedure TForm1.FormCreate(Sender: TObject);
var Series1: TSurfaceSeries;
begin
  Series1:=Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries;
  Series1.FillSampleValues;

  Series1.UseColorRange:=False;
  Series1.UsePalette:=True;
  Series1.PaletteStyle:=psCustom;
  Series1.ClearPalette;
  Series1.AddPalette(0,clYellow);  // up to 0.0 = yellow
  Series1.AddPalette(0.5,clGreen); // from 0.0 to 0.5 = green
  Series1.AddPalette(1,clRed);     // from 0.5 to 1.0 = red
  Series1.PaletteSteps:=10;
end;
However, the TPolarGridSeries uses a TSeriesColorPalette while the TSurfaceSeries (and other 3D series) uses a TCustom3Dpalette.
That's why you can't access some methods from a PolarGrid than from a Surface, like ClearPalette, that would be useful here.
What you can do, is to define a ColorRange:

Code: Select all

uses TeePolarGrid, TeePolarGridEditor;

procedure TForm1.FormCreate(Sender: TObject);
var Series1: TPolarGridSeries;
begin
  Chart1.View3D:=False;

  Series1:=TPolarGridSeries.Create(Self);
  Series1.ParentChart:=Chart1;
  Series1.FillSampleValues;
  Series1.Palette.UseColorRange:=True;
  Series1.Palette.UsePalette:=False;
  Series1.Palette.StartColor:=clBlue;
  Series1.Palette.EndColor:=clRed;
  Series1.Palette.MidColor:=clYellow;
end;
You still can access some TCustom3Dpalette methods from the TpolarGridSeries through the property Palette.Series, but this doesn't work as expected:

Code: Select all

uses TeePolarGrid, TeePolarGridEditor, TeeSurfa;

procedure TForm1.FormCreate(Sender: TObject);
var Series1: TPolarGridSeries;
begin
  Chart1.View3D:=False;

  Series1:=TPolarGridSeries.Create(Self);
  Series1.ParentChart:=Chart1;
  Series1.FillSampleValues;

  Series1.Palette.Series.UseColorRange:=False;
  Series1.Palette.Series.UsePalette:=True;
  Series1.Palette.Series.PaletteStyle:=psCustom;
  Series1.Palette.Series.ClearPalette;
  Series1.Palette.Series.AddPalette(0,clYellow);  // up to 0.0 = yellow
  Series1.Palette.Series.AddPalette(0.5,clGreen); // from 0.0 to 0.5 = green
  Series1.Palette.Series.AddPalette(1,clRed);     // from 0.5 to 1.0 = red
  Series1.Palette.Series.PaletteSteps:=10;
end;
I'll add this to the defect list to be revised (TV52016402).
In the meanwhile, I'd suggest you soing something like in the "New..." button in the "Palette/Colors" Tab in TeeGriEd.dfm, as said in the last post.
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