c# - WPF BubbleSeries, iterate over the bubbles and set the style -


i have bubbleseries within chart. bind data bubbleseries , set specific color bubbles.

what want iterate on bubbles , set each bubble's color specific color depending on value.

my bubbles, 2 series: alt text

the gray bubbles should gray, blue bubbles should have different colors depending on sizevalue.

any clues how iterate on bubbles , set specific color? possible?

i found solution:

i didn't need iterate on bubbles, instead solved problem valueconverter.

i have valueconverter takes value , return color depending on value.

i bind response valueconverter datapointstyle:

        <charting:bubbleseries.datapointstyle>                     <style                         targettype="charting:bubbledatapoint">                         <setter                             property="background">                             <setter.value>                                 <solidcolorbrush                                     color="{binding path=propertyonobjectboundtograph, converter={staticresource colorformater}}"></solidcolorbrush>                             </setter.value>                         </setter> 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -