Page 1 of 1

About the point style of ImagePointSeries?

Posted: Wed Nov 12, 2008 10:27 am
by 8574101
I have changed the type of the point style to "Square" at the style combobox ,then run the BCB6.0,but the points painted on the form
are not "Square",just the default blue points.

I have tried all the types in the combobox ,but nothing to get changes,
just the default blue points.

[img]
http://img1.freep.cn/p.aspx?u=v20_img1_ ... 103843.jpg
[/img]

[img]
http://img1.freep.cn/p.aspx?u=v20_img1_ ... 103843.jpg
[/img]


Code:

Code: Select all

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "ImaPoint.hpp"
#include <Chart.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Series.hpp>
#include <TeEngine.hpp>
#include <TeeProcs.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
    TChart *Chart1;
    TImagePointSeries *Series1;
private:	// User declarations
public:		// User declarations
    __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif



#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "ImaPoint"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
  Chart1->Series[0]->FillSampleValues(100);
}


Posted: Wed Nov 12, 2008 10:43 am
by narcis
Hi wwp3321,

You need to set Pointer.Style and load pointer image later, for example:

Code: Select all

        Series1->FillSampleValues();
        Series1->Pointer->Style=psRectangle;
        Series1->ImagePoint->LoadFromFile("C:\\temp\\polargrid.bmp");

Posted: Thu Nov 13, 2008 12:24 am
by 8574101
I didn't want to set a custom picture as point style,just to select the styles
that tchart offered in the style combobox.

[img]
http://img1.freep.cn/p.aspx?u=v20_img1_ ... 103843.jpg
[/img]

I have added points to series liking following.

Code: Select all

Chart1->Series[0]->FillSampleValues(100);
Series1->Pointer->Style=psRectangle;
//Series1->Pointer->Style=psDiamond;
But the points painted are still blue default points .
[img]
http://img1.freep.cn/p.aspx?u=v20_img1_ ... 103843.jpg
[/img]

PS:Could you get the the links of pictures?

Posted: Tue Nov 18, 2008 11:10 am
by narcis
Hi wwp3321,

Yes, I saw the pictures.

In that case you could use a standard points series where you can set the pointer style and also set a specific image for it. Images can be loaded to series' pattern.