Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - SOLVED: Chart: How to load a custom pallete
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Chart: How to load a custom pallete

 Post Reply Post Reply
Author
Message Reverse Sort Order
SimasJ View Drop Down
Newbie
Newbie


Joined: 22 February 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote SimasJ Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Chart: How to load a custom pallete
    Posted: 25 February 2012 at 2:11pm
Solved. Sorry I posted a bit to early :( 

The following line is wrong above. It should be:

PalletePropExchange.CreateAsXML True, "Pallete"

The section refers to the xml node to load and I wasn't aware of that.
Back to Top
SimasJ View Drop Down
Newbie
Newbie


Joined: 22 February 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote SimasJ Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2012 at 2:00pm
Hi,

I created a pallete using the Chart Builder and saved it to a file. Then I am loading it with the following code:

Dim PalletePropExchange As PropExchange
Set PalletePropExchange = ChartControlGlobalSettings.CreatePropExchange
PalletePropExchange.CreateAsXML True, "Content"
PalletePropExchange.LoadFromFile pPalletePath
    
mChart.Content.Appearance.LoadPalette PalletePropExchange

Where pPalletePath is the full path to a file wit this text:

<Palette CompactMode="1">
<Items>
<Item Color="86, 135, 26" Color2="221, 168, 117"/>
<Item Color="236, 159, 56" Color2="186, 198, 146"/>
<Item Color="227, 166, 0" Color2="255, 211, 89"/>
<Item Color="204, 162, 17" Color2="242, 214, 106"/>
<Item Color="193, 118, 20" Color2="237, 170, 82"/>
<Item Color="125, 123, 56" Color2="194, 192, 119"/>
<Item Color="178, 145, 57" Color2="219, 200, 144"/>
<Item Color="80, 85, 74" Color2="150, 158, 142"/>
<Item Color="70, 59, 84" Color2="115, 97, 137"/>
<Item Color="44, 53, 28" Color2="74, 88, 48"/>
<Item Color="49, 64, 80" Color2="83, 106, 134"/>
<Item Color="80, 51, 31" Color2="136, 88, 53"/>
</Items>
</Palette>

This does not affect the chart at all as it keeps showing the default colours.

What am I missing?

Best Regards,
Jose
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.