!!!###!!!title=123-Can we add a horizontal line for the average value to the data——VisActor/VChart FAQ documents!!!###!!!

Can we add a horizontal line for the average value to the data?

Question Description

When using the VChart chart library, can you achieve an effect similar to the figure below, adding a label line to the chart to represent the average value of the data? markline average

Solution

VChart has rich data annotation capabilities. For the scenario you described, you only need to configure x: 'average' in markLine.

Code Example

Quote