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

c# - IMAP GMAIL getting folder list problem -

PHP proxy to get XML: problem with URL arguments -