Would you like to work on this feature?
What problem are you trying to solve?
Since chartist-plugin-legend seem inactive, and is incompatible with Chartist v1 [1], there doesn't seem to be a way to put legends in Chartist plots anymore. Chart legends should be part of Chartist core lib and not a plugin since it's essential to make non-trivial plots meaningful.
[1] Upgrading the chartist CSS and JS sources in https://codepen.io/chimmer/pen/QVvMgz?editors=1111 breaks the demo
Describe the solution you'd like
By default, the legend should be constructed from the name field provided in the series list, and default to using the alpha-numerated classnames (so, Plot A, Plot B etc).
new Chartist.LineChart(
'#chart',
{
labels: ['a', 'b', 'c'],
series: [{'name': 'Plot 1', data: [1, 3, 4, 7, 11, 18]}, {'name': 'Plot 2', data: [1, 2, 3, 5, 8, 13]]
}, {
fullWidth: false,
},
});
Describe alternatives you've considered
No response
Documentation, Adoption, Migration Strategy
No response
Would you like to work on this feature?
What problem are you trying to solve?
Since chartist-plugin-legend seem inactive, and is incompatible with Chartist v1 [1], there doesn't seem to be a way to put legends in Chartist plots anymore. Chart legends should be part of Chartist core lib and not a plugin since it's essential to make non-trivial plots meaningful.
[1] Upgrading the chartist CSS and JS sources in https://codepen.io/chimmer/pen/QVvMgz?editors=1111 breaks the demo
Describe the solution you'd like
By default, the legend should be constructed from the
namefield provided in theserieslist, and default to using the alpha-numerated classnames (so,Plot A,Plot Betc).Describe alternatives you've considered
No response
Documentation, Adoption, Migration Strategy
No response