title: Setting the colour of a LiveCharts Series that has custom labels using XAML Binding
body: <p>The typical way of setting the Series Fill and Stroke are explained perfectly on the <a href="https://lvcharts.net/" rel="nofollow noreferrer">Livecharts website</a>. However, in order to set custom labels for points you need to create the Series in the view model (Shown below). This prevents you from being able to call Fill or Stroke in the XAML as you don't have each series being created like the example below.</p>
  
  <pre><code>&lt;lvc:CartesianChart Name="Chart" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="15"&gt;
     &lt;lvc:CartesianChart.Series&gt;
        &lt;lvc:LineSeries Values="{Binding Values}" LineSmoothness="1" StrokeThickness="10" 
                        DataLabels="True" FontSize="20" Foreground="#6B303030"
                        Stroke="White" Fill="Transparent" PointGeometrySize="0"/&gt;
     &lt;/lvc:CartesianChart.Series&gt;
  </code></pre>
  
  <p>My current code which creates the series and its associated labels.</p>
  
  <p><strong>ViewModel</strong></p>
  
  <pre><code>ABValuesSC = new SeriesCollection
      {
          new LineSeries
          { Values = ABValues,
              DataLabels = true,
              FontSize = 14,
              //MinPointShapeDiameter = 15,
              StrokeDashArray = new System.Windows.Media.DoubleCollection {2},
              Fill = System.Windows.Media.Brushes.Transparent,
              LabelPoint = point =&gt;
              {if(point.Key==0)
                  {
                      return "A";
                  }
              else
                  {
                      return "B";
                  }
              }
          },
          new ScatterSeries
          { Values = TriggerValues,
              DataLabels = true,
              FontSize = 14,
              MinPointShapeDiameter = 15,
              LabelPoint = point =&gt;
              {if(point.Key==0)
                  {
                      return "1";
                  }
              else
                  {
                      return "2";
                  }
              }
          },
          new LineSeries
          { Values = NAVmatValues,
              LineSmoothness=0,
          }
      };
  </code></pre>
  
  <p><strong>XAML</strong></p>
  
  <pre><code>&lt;lvc:CartesianChart  Series="{Binding ABValuesSC}"/&gt; 
  </code></pre>
  
  <p>Giving you this output.</p>
  
  <p><a href="https://i.stack.imgur.com/A3Y7w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A3Y7w.png" alt="enter image description here"></a></p>
  
  <p>Is there a method for accessing a series fill for the chart to change it from the default and have it be bindable? for example would it be possible to have the colours be bound to a list 
  
  or is there a better way of making the labels for my chart such that i can use a similar method to the example at the top of this post?</p>