Applying a default theme to a Chart series

Sandman8709

New Member
Using MSchart controls is somewhat difficult because of lack of information on the XML theme part.I'm creating a chart programatically and dynamically and then adding a theme to it using a XML theme file.I do not know how many series there will be but I'm trying to add one series for the total amount on each column in the StackedColumnBar.So I create each serie in a foreach loop from the data and then add the Total series as a bubble chart type.Now I have to apply a different series theme to the Total series and let all others have the same theme.I tried naming the series "Total" in both chart and theme file. The real catch is the Template="All" attribute because this isn't documented anywhere so I have no idea how it all really works and how it's being applied.Example of a theme:\[code\]<Chart BackColor="White" BorderWidth="2" Palette = "None" PaletteCustomColors="#F29E39; #007463; #E76E34; #A4A4A4; #94BBA3;" BorderlineDashStyle="Solid" AntiAliasing="All"> <Series> <Series Name="Total" BorderWidth="0" LabelForeColor="#FF000000" LabelFormat="C" IsVisibleInLegend="false" IsValueShownAsLabel="true" > </Series> <Series _Template_="All" BorderWidth="0" LabelForeColor="#AAFFFFFF" LabelFormat="C" CustomProperties="PointWidth=0.9, DrawingStyle=LightToDark" IsValueShownAsLabel="false" > </Series> </Series> <ChartAreas> <ChartArea Name="Default" _Template_="All" BorderWidth="0"> <AxisY IsInterlaced="true" InterlacedColor="#E8E7DC"> <MajorGrid Enabled="false" /> </AxisY> <AxisX> <MajorGrid Enabled="false" /> </AxisX> </ChartArea> </ChartAreas> <Legends> <Legend _Template_="All" Alignment="Center" LegendItemOrder="ReversedSeriesOrder" Docking="Bottom"/> </Legends></Chart>\[/code\]
 
Back
Top