PDA

View Full Version : Skinning Pie Chart with ExtJs



nkortha
18 Nov 2009, 3:42 AM
Hello everybody

At the moment i try to re design a Pie Chart but it will not work

The opportunities to skin a Chart did I found here:
http://developer.yahoo.com/yui/charts/#basicstyles

Ok what will I do

I want specify for each part of the Chart a background color and optional a background image.

To secify the bgcolor I use this(series)


var pieChart = new Ext.chart.PieChart({
renderTo: document.body,
store: store,
dataField: "users",
categoryField: "framework",
series:[{
style: {
colors: [0x8A2BE2, 0x00BFFF, 0xEE3B3B],
}
}],
extraStyle:{ //Step 1
legend:{ //Step 2
display: 'right'//Step 3
},
background: {
color: '#F5F5F5'
},
});
In this case I reskin each Element with a new background color and it works.

But now. How can I reskin only chosen Elements with different options.
such like

// examplecode


firstElement{
color: 'black'
image "test.jpg"
},
secendElement{
color:green
},
thirdElement{
// do nothing
}
I hope sb understand my problem ;)

Tank you

Condor
18 Nov 2009, 5:11 AM
No, you can only use 'colors' and 'images' in 'style'.

Don't know if it works, but have you tried specifying empty strings for some colors/images?