Jump to content



Need another color

  • Please log in to reply
3 replies to this topic

#1 kdalts



  • Members
  • Pip
  • 6 posts

Posted 08 April 2012 - 09:36 AM


Just started to get into this and so far I really like it. One quick challenge - how can I change the theme color sets. I will generally have at least 9 or 10 datasets and I would like them all to have a unique color. Currently using themes the green repeats after 8 points (although a darker green).

I read the doco but I use dreamweaver for development so I wasn't able to create my own theme.

#2 shoaib


    Advanced Member

  • Members
  • PipPipPip
  • 924 posts
  • Gender:Male
  • Location:Bangalore

Posted 09 April 2012 - 04:49 AM


Try creating Custom ColorSet as shown below in Visifire documentation.



#3 kdalts



  • Members
  • Pip
  • 6 posts

Posted 09 April 2012 - 08:04 AM

Thanks for the pointer.. but now I'm having a new challange...

Here is some code...
$chartXml = '<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="380" Height="300" BorderThickness="0.5" Padding="3" AnimationEnabled="true" Theme="' . $theme . '" View3D="True" ShadowEnabled="true" >\''
		.'+\''.'<vc:Title Text="'.$title.'" FontSize="14"/>\''
	'+\''.'<vc:Chart ZoomingMode="MouseWheel"/>\''

The <vc:Chart ZoomingMode="MouseWheel"/>\ doesn't work and the chart fails to render.... this happens with any new code I add including the colorset below...

//Colour set
	   .'+\''.'<vc:Chart ColorSet="Visifire2">\''



                .'+\''.'<vc:ColorSet Id="Visifire2">\''


                        .'+\''.'<SolidColorBrush Color="#808000"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#d5935e"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#638090"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#405b45"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#5b5853"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#8f4b32"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#863901"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#6d6743"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#716820"></SolidColorBrush>\''

                        .'+\''.'<SolidColorBrush Color="#7e6046"></SolidColorBrush>\''




Can't figure out wha I'm doing wrong.... the rest of the chart code is exactly the same format and it works fine...

	            .'+\''.'<vc:AxisLabels Enabled="true" FontSize="' . $fontsize . '"/>\''
	.'+\''.'</vc:Chart.AxesX>\''	//end of XAXIS settings

	            .'+\''.'<vc:AxisLabels Enabled="true" FontSize="' . $fontsize . '"/>\''
	.'+\''.'</vc:Chart.AxesY>\''	//end of YAXIS settings
	//Legend settings
        .'+\''.'<vc:Legend Name="Legend1" FontSize="' . $fontsize . '"/>\'' 

		//data series 1
    	.'+\''.'<vc:DataSeries LegendText="Completed" RenderAs="Pie" LabelEnabled="True" LabelFontSize="' . $fontsize . '" LabelStyle="Outside" Legend="Legend1">\''
    for ($i = 0; $i < count($records); $i++) {
        $chartXml = $chartXml .'+\''.'<vc:DataPoint AxisXLabel="'.$records[$i][0].'" YValue="'.$records[$i]['Completed'].'"/>\'';
    $chartXml = $chartXml .'+\''.'</vc:DataSeries.DataPoints>\''
		//end of data series 1
	.'+\''.'</vc:Chart.Series>\''//end of series settings

#4 vivek


    Advanced Member

  • Team Visifire
  • PipPipPip
  • 3,611 posts
  • Gender:Male
  • Location:Bangalore

Posted 10 April 2012 - 04:35 AM

Which version of Visifire are you using?

Team Visifire

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users