Piechart Slices Color and Animations on Playground

nativescriptcore

#1

Hi
I tried setting up the slices color in the pei chart on playground but couldnt manage to get the colors reflected on my device as well. Can someone please help?

Also how to create animation when pie chart is rendered?

Thanks
Rakesh


#2

Use the right syntax,

			<chart:RadPieChart.palette>
				<chart:PaletteEntry fillColor="#ffff00" strokeColor="#000000"></chart:PaletteEntry>
				<chart:PaletteEntry fillColor="#cc3399" strokeColor="#000000"></chart:PaletteEntry>
				<chart:PaletteEntry fillColor="#ff6600" strokeColor="#000000"></chart:PaletteEntry>
				<chart:PaletteEntry fillColor="#cc3589" strokeColor="#000000"></chart:PaletteEntry>
				<chart:PaletteEntry fillColor="#f46540" strokeColor="#000000"></chart:PaletteEntry>
			</chart:RadPieChart.palette>

Supposed to be

           <chart:RadPieChart.palettes>
				<chart:Palette>
					<chart:Palette.entries>
						<chart:PaletteEntry fillColor="#000000" strokeColor="#000000"></chart:PaletteEntry>
						<chart:PaletteEntry fillColor="#cc3399" strokeColor="#000000"></chart:PaletteEntry>
						<chart:PaletteEntry fillColor="#ff6600" strokeColor="#000000"></chart:PaletteEntry>
						<chart:PaletteEntry fillColor="#cc3589" strokeColor="#000000"></chart:PaletteEntry>
						<chart:PaletteEntry fillColor="#f46540" strokeColor="#000000"></chart:PaletteEntry>
					</chart:Palette.entries>
				</chart:Palette>
			</chart:RadPieChart.palettes>

#3

Hey @manojdcoder. Thank you for your response. Yeah I used wrong syntax. I got this repo from telerik where we have the sample related to Graphs, ListView, Calendar, DataForm which is of a great help.