I am figure out how to put legends in chart created with google chart, I have a chart with 3 series that represent a trend for a three different metrics, and for each line there is a one point that the metric have a change in the way that is calculated, this is represented by a circle in the line for each series, and at the end of the line I have another shape that represent the last date that the series have data.
I have the chart up and running creating one additional serie for each indicator with the value that have the line in the same point, and I formatted all idicator column with series property of google options:
series: {
3: { pointShape: "circle", pointSize: 10, visibleInLegend: false },
4: { pointShape: "circle", pointSize: 10, visibleInLegend: false },
5: { pointShape: "circle", pointSize: 10, visibleInLegend: false },
6: { pointShape: "triangle", pointSize: 15, visibleInLegend: false },
7: { pointShape: "triangle", pointSize: 15, visibleInLegend: false },
8: { pointShape: "triangle", pointSize: 15, visibleInLegend: false }
}
You can see an example here
So far so good, the challenge is that I need to put a legend for this indicators, not for each series like a normal behavior of google chart, witch put one legend for each dot and one legend for each triangle. I have disabled to show legend on series with indicators to avoid this behavior.
I want to do something similar to this:
Notice that this legend are independent of the label or tooltip message of each series or indicator, is a specific text that is common for each indicator, additionally is not a normal line that google put for each legend, is a custom shape similar to the type of indicator that it represent.
There is a way to do this?