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:
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
Post a Comment