Creating vertical lines to represent standard deviation using react-chartjs-2 at every x point

Viewed 47

I'm creating a chart to represent data displayed on a chart for analysis. Each dataset represents a family and in each family I have multiple datasets. Right now i can switch between showing each dataset individually and averaged together into one line. What I need to do next is create vertical lines at each interval on the x-axis to represent the standard deviation there. However I'm not sure how to create vertical lines. Picture below shows what I'm trying to accomplish. I have the line I just need to know how to create my error bars. Also the picture below is just an example I don't care what the error bars actually look like.

enter image description here

If you need any additional information I'm more then happy to provide it.

[SOLUTION]

I ended up just utilizing the ability to stack bar charts to simulate error bars. I created a bottom bar that was transparent then stacked a bar on top of that with color in order to represent my error bars. I just edited the length of my bottom bar based on the Standard Deviation.

0 Answers
Related