Jump to content

 

Photo

Need another color


  • Please log in to reply
3 replies to this topic

#1 kdalts

kdalts

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 08 April 2012 - 09:36 AM

Hi

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

shoaib

    Advanced Member

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

Posted 09 April 2012 - 04:49 AM

Hi,

Try creating Custom ColorSet as shown below in Visifire documentation.

http://visifire.com/...anaged_code.htm

Regards,
Shoaib

#3 kdalts

kdalts

    Newbie

  • 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" >\''
	
			//TITLE
	.'+\''.'<vc:Chart.Titles>\''
		.'+\''.'<vc:Title Text="'.$title.'" FontSize="14"/>\''
    .'+\''.'</vc:Chart.Titles>\''
	
	'+\''.'<vc:Chart ZoomingMode="MouseWheel"/>\''
	.'+\''.'</vc:Chart>\''

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:Chart.ColorSets>\''

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

                    .'+\''.'<vc:ColorSet.Brushes>\''

                        .'+\''.'<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>\''

                    .'+\''.'</vc:ColorSet.Brushes>\''

                .'+\''.'</vc:ColorSet>\''

           .'+\''.'</vc:Chart.ColorSets>\''

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

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


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

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


#4 vivek

vivek

    Advanced Member

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

Posted 10 April 2012 - 04:35 AM

Which version of Visifire are you using?

Regards,
Vivek
Team Visifire





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users