Print Page | Close Window

SOLVED: Chart: How to load a custom pallete

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=19520
Printed Date: 30 January 2025 at 8:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Chart: How to load a custom pallete
Posted By: SimasJ
Subject: SOLVED: Chart: How to load a custom pallete
Date 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



Replies:
Posted By: SimasJ
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net