title: Using a function in ng2 Charts
body: <p>Hi I am currently trying to get a simple function working in ng2 Charts.</p>
  <p>my Function:</p>
  <pre><code>  changeFontColor(){
      let change = this.lineChartOptions.legend.labels.fontColor = &quot;red&quot;;
      return change;
    };
  </code></pre>
  <p>and my lineChartOptions:</p>
  <pre><code>public lineChartOptions: ChartOptions = {
      responsive: true,
      legend:{
      onHover: this.changeFontColor,
       labels: {
        boxWidth: 10, 
        padding: 20,
      
        fontSize: 15,
        fontFamily: &quot;new Times Roman&quot;,
        fontStyle: &quot;bold&quot;,
        fontColor: &quot;grey&quot;,
    };
  </code></pre>
  <p>but i dont know why its not working the console says that <code>lineChartOptions</code> is undefined but i don't get any red underscores and dont know how to fix it.</p>