Jump to content
Software FX Community

Color Palettes


User (Legacy)

Recommended Posts

Is there a way to get the colors that will be assigned by a built-in color 

palette before they are automatically assigned to a Series. Something like a

Palette.GetNextColor() call? I need to retain colors for each Series in a

Chart. To do so, I would like to resolve conflicts by assigning colors from

the current Palette. Any help would be greatly appreciated.

Link to comment
Share on other sites

Dear Judd,

I am a little confused as to what your problem is.

"I would like to resolve conflicts by assigning colors from the current

Palette"

We handle all the assigning of the colors ourselves.

Conflicts within ChartFX?

Do you want to get the colors from the palette to use outside of the chart?

-c

"judd" <judd@protosw.com> wrote in message

news:1gYtdCSxFHA.1764@webserver3.softwarefx.com...

> Is there a way to get the colors that will be assigned by a built-in color

> palette before they are automatically assigned to a Series. Something like

> a Palette.GetNextColor() call? I need to retain colors for each Series in

> a Chart. To do so, I would like to resolve conflicts by assigning colors

> from the current Palette. Any help would be greatly appreciated.

>

>

post-2107-13922379668987_thumb.jpg

Link to comment
Share on other sites

I am having a similar issue.  

Because the DataEditor Table Format Transposes When changing from Bottom to Right (see my earlier post regarding this issue) I have to build my own version of the DataEditor. I would like to allow the chart to build itself (Bind to a DataTable) and then build a grid where I match-up the colors that were chosen by ChartFx.

A couple of questions:

1. Is there any way to know what order colors are chosen by the ChartFx binding mechanism?

2. How do I know exactly what System.Drawing.Color.* corresponds to the colors in each ChartFx pallete?

I have attached a picture of what I am trying to accomplish.

Thanks in advance,

Kent Bejcek

Squarei Technologies Inc

"Software FX Support" <support@softwarefx.com> wrote in message news:Z1eqqzcxFHA.1856@webserver3.softwarefx.com...

> Dear Judd,

> I am a little confused as to what your problem is.

> "I would like to resolve conflicts by assigning colors from the current

> Palette"

> We handle all the assigning of the colors ourselves.

> Conflicts within ChartFX?

> Do you want to get the colors from the palette to use outside of the chart?

> -c

>

> "judd" <judd@protosw.com> wrote in message

> news:1gYtdCSxFHA.1764@webserver3.softwarefx.com...

>> Is there a way to get the colors that will be assigned by a built-in color

>> palette before they are automatically assigned to a Series. Something like

>> a Palette.GetNextColor() call? I need to retain colors for each Series in

>> a Chart. To do so, I would like to resolve conflicts by assigning colors

>> from the current Palette. Any help would be greatly appreciated.

>>

>>

>

>

Link to comment
Share on other sites

Dear Kent,

The API you can use with a PIE chart to get the colors is like this

chart1.Point[0].Color for Pie the color will come from the Point but bar and lines from from chart1.Series[0].Color

However, there is an undocumented way to do this if you cast the chart to an IContainerX see snippet:

SoftwareFX.ChartFX.Extensions.IContainerX iContainerX = (SoftwareFX.ChartFX.Extensions.IContainerX)chart1;

// Method A -- will give you all the palette colors of which the first 16 are colors used to paint the bars/lines...

Color[] colors = iContainerX.GetPaletteColors();

// Method B -- You can ask for the Attributes for a particular Series and Point

SoftwareFX.ChartFX.Base.AttributesBase attribBase = iContainerX.GetAttributesBase(0,0, null);

Color clr = attribBase.m_clrFore;

The above code is subject to change and is provided as is.

-c

"Kent Bejcek" <kent@bejcek.com> wrote in message news:pb$CRajyFHA.3776@webserver3.softwarefx.com...

I am having a similar issue.

Because the DataEditor Table Format Transposes When changing from Bottom to Right (see my earlier post regarding this issue) I have to build my own version of the DataEditor. I would like to allow the chart to build itself (Bind to a DataTable) and then build a grid where I match-up the colors that were chosen by ChartFx.

A couple of questions:

1. Is there any way to know what order colors are chosen by the ChartFx binding mechanism?

2. How do I know exactly what System.Drawing.Color.* corresponds to the colors in each ChartFx pallete?

I have attached a picture of what I am trying to accomplish.

Thanks in advance,

Kent Bejcek

Squarei Technologies Inc

"Software FX Support" <support@softwarefx.com> wrote in message news:Z1eqqzcxFHA.1856@webserver3.softwarefx.com...

> Dear Judd,

> I am a little confused as to what your problem is.

> "I would like to resolve conflicts by assigning colors from the current

> Palette"

> We handle all the assigning of the colors ourselves.

> Conflicts within ChartFX?

> Do you want to get the colors from the palette to use outside of the chart?

> -c

>

> "judd" <judd@protosw.com> wrote in message

> news:1gYtdCSxFHA.1764@webserver3.softwarefx.com...

>> Is there a way to get the colors that will be assigned by a built-in color

>> palette before they are automatically assigned to a Series. Something like

>> a Palette.GetNextColor() call? I need to retain colors for each Series in

>> a Chart. To do so, I would like to resolve conflicts by assigning colors

>> from the current Palette. Any help would be greatly appreciated.

>>

>>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...