Jump to content
Software FX Community

Coloring series 0 of a chart and leaving the colouring of series 1


User (Legacy)

Recommended Posts

Hello!

I have been working on code to colour my chart when it only has 1 series, a

bar chart, that code works perfectly. Now I have a problem. I want to put a

line graph onto the chart as a second series. Now when I run my graph the

colouring code affects the line graph as well. How do I just colour the

points for the first series? I would have liked to have been able to do

something

cfxChart1.Series(0).Color(...)=red, etc

But this is not possible

Cheers

Paul

Link to comment
Share on other sites

When you open COD_COLORS, you are essentially openning the color pallete.

Make sure and open COD_COLORS for both series (telling it to use two

different colors), even though you are assigning only one color. Here is

some sample code:

ChartFX1.OpenDataEx COD_COLORS, 2, 0

ChartFX1.Series(0).Color = RGB(0,255,0) 'Set the first series to

green

ChartFX1.CloseData COD_COLORS

If you use the statement "...OpenDataEx COD_COLORS, 1, 0" it will assign

that one color to all series. Hope this helps.

Chris

"Paul Saxton" <paul.saxton@stcenergy.com> wrote in message

news:fRP#OosuBHA.1412@webserver1.softwarefx.com...

> Hello!

>

> I have been working on code to colour my chart when it only has 1 series,

a

> bar chart, that code works perfectly. Now I have a problem. I want to put

a

> line graph onto the chart as a second series. Now when I run my graph the

> colouring code affects the line graph as well. How do I just colour the

> points for the first series? I would have liked to have been able to do

> something

>

> cfxChart1.Series(0).Color(...)=red, etc

>

> But this is not possible

>

> Cheers

>

> Paul

>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...