Page 1 of 1

TVolumeSeries color

Posted: Fri Jul 06, 2007 2:47 pm
by 9244858
hello,
I have the following step programs:
1. savechart (initial chart) to strem;
2. load chart from stream in another chart;
3. change chart properties: series color, chart background....
When I change TVolumeSeries color, the new color is applyed in chart.
After these I want to apply the new properties to initial chart.
4. clik one button for this.
The TVolumeSeries color remain unchanged on a grafic, even in chart editor I can see the new color.
Could you help?

Thank you,
Cristina

Posted: Fri Jul 06, 2007 8:03 pm
by narcis
Hi Cristina,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

TVolumeSeries color

Posted: Mon Jul 09, 2007 3:56 pm
by 9244858
I have uploaded a demo to the upload server.
This demo reproduces the bug:
- open up a chart, edit the properties by altering the volume series color
- apply that property; you will notice the chart volume series is not altered
- add some more points to the series. The effect is that the new points are added with the new color, while the series points already there are kept with the old color.

Regards,
Cristina

Posted: Tue Jul 10, 2007 11:06 am
by yeray
Hi Cristina,

We noticed that in your volume series you add your values with a color for each point, and since then, changing the series color doesn't affect to the points.

So you could add your points using teecolor instead of volumeSeries->Color

Code: Select all

tmp =  volumeSeries->AddXY(i,random(20),"", clTeeColor);
//                volumeSeries->Color);
Or you could assign the new color for each point with a for.

Posted: Tue Jul 10, 2007 11:58 am
by 9244858
Hello,
It works. Thank you.

Cristina

Posted: Tue Jul 10, 2007 12:19 pm
by 9244858
Hi,
Also, I don't know what I am doing wrong with settings for bollinger function properties because the LowBand color is not updated.
I create a function with default properties, and after that assign new properties:
// set Bollinger function properties

TLineSeries* fSeries = indicatorObject->series;
TBollingerFunction* f = (TBollingerFunction*)fSeries->FunctionType;
fSeries->SeriesColor = indicatorObject->color;
fSeries->Pen->Style = indicatorObject->style;
fSeries->Pen->Width = indicatorObject->width;
fSeries->YValues->ValueSource = indicatorObject->getParamsByName("Apply to")->value;
f->Period = StrToInt(indicatorObject->getParamsByName("Period")->value);
fSeries->FunctionType->Period = f->Period;
f->Deviation = StrToInt(indicatorObject->getParamsByName("Deviation")->value);
f->Exponential = StrToBool(indicatorObject->getParamsByName("Exponential")->value);
f->LowBandPen->Color = StringToColor(indicatorObject->getParamsByName("LowBandColor")->value);
f->LowBand->SeriesColor = f->LowBandPen->Color;
f->LowBandPen->Style = indicatorObject->style;
fSeries->CheckDataSource();


Thanks for your help,
Cristina

Posted: Mon Jul 30, 2007 9:59 am
by narcis
Hi Cristina,

Have you managed to solve the problem? If not, could you please send us a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Posted: Mon Jul 30, 2007 10:03 am
by narcis
Hi Cristina,

Ok, now I found this has continued here.