wpftoolkit - Overriding DataPointStyle in a WPF Toolkit Chart -


i'd override datapointstyle of lineseries in wpf toolkit chart:

<chart:lineseries>     <chart:datapointseries.datapointstyle>         <style             basedon="{staticresource {x:type chart:linedatapoint}}"             targettype="{x:type chart:linedatapoint}">             <setter property="width" value="20" />             <setter property="height" value="20" />         </style>     </chart:datapointseries.datapointstyle> </chart:lineseries> 

however when lose automatic palette coloring each series has different color. applying datapointstyle causes them turn orange.

until suggests better method, i've manually set colors. guess won't using automatic palette now.

<style     x:key="simpledatapointstyle"     basedon="{staticresource {x:type charting:linedatapoint}}"     targettype="{x:type charting:linedatapoint}">     <setter property="width" value="20" />     <setter property="height" value="20" /> </style>  ...  <chart:lineseries ... >     <chart:datapointseries.datapointstyle>         <style             basedon="{staticresource simpledatapointstyle}"             targettype="{x:type charting:linedatapoint}">             <setter property="background" value="green" />         </style>     </chart:datapointseries.datapointstyle> </chart:lineseries> <chart:lineseries ... >     <chart:datapointseries.datapointstyle>         <style             basedon="{staticresource simpledatapointstyle}"             targettype="{x:type charting:linedatapoint}">             <setter property="background" value="red" />         </style>     </chart:datapointseries.datapointstyle> </chart:lineseries> 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -