How To Style Modern UI RadialGaugeChart
<p>I'm using Modern UI Charts in my project (<a href="https://modernuicharts.codeplex.com/" rel="nofollow">Modern UI Charts</a>), and I'm trying to change the chart <strong>foreground</strong> and palette based on <strong>ValueMember</strong>.</p>

<p>I have a converter:</p>

<pre><code>public class MetricsColorConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        //Dim num As Integer
        string color = null;
        decimal intValue = default(decimal);
        if (decimal.TryParse(value.ToString(), intValue)) {
            if (intValue &lt;= 60.0) {
                return "Red";
            } else if (intValue &gt;= 60.01 &amp;&amp; intValue &lt; 80.0) {
                return "Yellow";
            } else if (intValue &gt;= 80.01) {
                return "Green";
            }
        }

        return color;
    }
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
</code></pre>

<p>And my xaml with a chart:</p>

<pre><code>&lt;chart:RadialGaugeChart
       ChartTitleVisibility="Collapsed"
       ChartLegendVisibility="Collapsed"
       ToolTipFormat="{}Caption: {0}, Value: '{1}', Series: '{2}', Percentage: {3:P2}"
       HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,5,5" Height="170" &gt;
    &lt;chart:RadialGaugeChart.Style&gt;
           &lt;Style TargetType="{x:Type chart:RadialGaugeChart}"&gt;
                &lt;Style.Triggers&gt;
                &lt;DataTrigger Binding="{Binding ElementName=ProductivitySeries, Path=ValueMember, Converter={StaticResource MetricsConverter}}" Value="Green"&gt;
                       &lt;Setter Property="Foreground" Value="{StaticResource Flat_GreenAccentBrush}"/&gt;
                &lt;/DataTrigger&gt;
                &lt;DataTrigger Binding="{Binding ElementName=ProductivitySeries, Path=ValueMember, Converter={StaticResource MetricsConverter}} "Value="Yellow"&gt;
                       &lt;Setter Property="Foreground" Value="{StaticResource Flat_MetricYellowBrush}"/&gt;
                &lt;/DataTrigger&gt;
                &lt;DataTrigger Binding="{Binding ElementName=ProductivitySeries, Path=ValueMember, Converter={StaticResource MetricsConverter}}" Value="Red"&gt;
                       &lt;Setter Property="Foreground" Value="{StaticResource Flat_MetricRedBrush}"/&gt;
                &lt;/DataTrigger&gt;
            &lt;/Style.Triggers&gt;
           &lt;/Style&gt;
    &lt;/chart:RadialGaugeChart.Style&gt;
&lt;chart:RadialGaugeChart.Series&gt;
    &lt;chart:ChartSeries 
          Name="ProductivitySeries" 
          SeriesTitle="Productivity" 
          ItemsSource="{Binding TeamLeaderViewM.TeamLeaderMetrics}" 
          DisplayMember="TeamLeader" 
          ValueMember="Productivity"/&gt;
    &lt;/chart:RadialGaugeChart.Series&gt;
&lt;/chart:RadialGaugeChart&gt;
</code></pre>

<p>Unfortunately, nothing is changing here. Color is the same, all the time.
How can I implement this to my charts?</p>

<p>Thank you for suuggestions</p>