Page 1 of 1

ColorEachPoint makes me crazy...

Posted: Wed Nov 16, 2011 6:11 pm
by 16560339
Dear Support,

Client with Steema for D7, I try now Steema Active to develop web page...

I test actually ActiveX product and I do this sample (see below) but I can't set my Bar Chart with ColorEachPoint to True.

I read your forum, I saw some posts but without solving my problem.

With the code below, I have 3 bars blue, I test also clTeeColor and I have 3 bars black.

could you help me please to solve my problem and obtain a chart with ColorEachPoint.
(and better for me, obtain chart with Opera style color)

Many thanks! !!!

Code: Select all

    
<script language="VBScript">
	SUB FillChart
	    With Chart1
     		'sets up Chart to print from IE's print option
     		.Environment.IEPrintWithPage=True

     		.RemoveAllSeries
     		.AddSeries(1)
     		.Aspect.View3D = False
			.Aspect.gdiplus.active = True
     	 	.Legend.Visible=False
         	.Panel.Gradient.Visible=True
			.Walls.Visible = False


	    End With

		With Chart1.Header
		  .Text.Clear
		  .Transparent = True
		  .Text.Add("MyProject")
		End with

		With Chart1.Footer.Font
			.Name = "Tahoma"
			.Bold = False
        End With

		With Chart1.Series(0)
			 .Clear
			 .asBar.BarStyle = 8
			 .asBar.BarPen.Visible = false
			 .asBar.Transparency = 35

			 .asBar.Shadow.Visible = False
			 .asBar.Emboss.Visible = True
			 .asBar.Emboss.VertSize = 3
			 .asBar.Emboss.HorizSize = -4
			 .asBar.Emboss.color = RGB(192, 192, 192)

			 .Marks.Transparent = True


			 .Add 100, "Apples"  , vbBlue '.Color
		     .Add 300, "Pears"   , vbBlue '.Color
		     .Add 200, "Bananas" , vbBlue '.Color
			 .ColorEachPoint = True


			.Marks.Style = smsValue
		End With

    	Chart1.View3D=False

		Chart1.Legend.Visible=False

		Chart1.Panel.Gradient.Visible=True

    END SUB

Re: ColorEachPoint makes me crazy...

Posted: Fri Nov 18, 2011 3:25 pm
by yeray
Hi Matheo,

I see you are adding your points with vbBlue color. Note that setting a color for the values, this color set has priority to the ColorEachPoint property.
You could add your values with clTeeColor and the OperaPalette will be used.

Re: ColorEachPoint makes me crazy...

Posted: Fri Nov 18, 2011 3:34 pm
by 16560339
Hi Yeray,
You could add your values with clTeeColor and the OperaPalette will be used.
ok but if I set to clTeeColor, all my stack are black and the ColorEachPoint don't work also.
May be, clTeeColor is unknow. Do you have the numerical value, may be I can test with it?

And how it knows that it must use OperaPalette. If I want to use another palette how can i do,

Many thx Yeray,
sincelery,
Bruno

Re: ColorEachPoint makes me crazy...

Posted: Mon Nov 21, 2011 3:05 pm
by yeray
Hi Bruno,
Matheo Soft. wrote:May be, clTeeColor is unknow. Do you have the numerical value, may be I can test with it?
If you want to know the value of a TeeChart constant you can look at the TeeChartDefines.h in your "\Utilities\New VC Classes" folder in your TeeChart ActiveX installation.

Code: Select all

const unsigned long clTeeColor = 536870912;
Matheo Soft. wrote:And how it knows that it must use OperaPalette. If I want to use another palette how can i do,
Please, take a look at the example at "All Features\Welcome!\Aspect\Custom Palettes" to see how to change the palette.

Re: ColorEachPoint makes me crazy...

Posted: Mon Nov 21, 2011 3:24 pm
by 16560339
Hi Yeray,

Thx a lot ! it works, I don't know why but clTeeColor is unknown ?!!

Do you have already seen this problem ?
I actually use an evaluation version version, is it possible that was that ?

Re: ColorEachPoint makes me crazy...

Posted: Mon Nov 21, 2011 4:14 pm
by yeray
Hello Bruno,

I think it was my fault. These constants can be used in VB6 but in VBScript.

Re: ColorEachPoint makes me crazy...

Posted: Mon Nov 21, 2011 5:04 pm
by 16560339
Ok, no problem, now I know where I can find them ;)