-
Notifications
You must be signed in to change notification settings - Fork 1
Add 2030 Goal Line
-
First add the Year: 2030 and the desired goal Value to the indicator data file. An example can be found here.
-
Add the following to scripts.html file inside the _includes folder:
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/0.5.7/chartjs-plugin-annotation.js"></script>
-
In assets/js/indicatorView.js in the _includes folder as well add these functions. The first function adds the line and calls the remove2030 function to remove the value for the year 2030 from the dataset captured by the chart:
-
Lastly, add the code below to the this.createPlot function (you can find an example here):
If you have any suggestions for this material, please feel free to raise an issue; or if you have any additional questions that are not covered, please feel free to contact us.