Graph2d | Groups Example
This example shows the groups functionality within Graph2d. This works in
the same way as it does in Timeline, We have however simplified the
constructor to accept groups as well to shorten the code. These groups are
the method used in Graph2d to define individual graphs. These groups can
be given an individual class as well as all the styling options you can
supply to Graph2d! This example, as well as the ones that follow will
showcase a few different usages of these options.
This example also introduces the automatically generated legend. The icons
are automatically generated and the label is the content as you define it
in the groups. If you have datapoints that are not part of a group, a
default group is created with the label: 'default'. In this example, the
setting defaultGroup
is used to rename the default group to
'ungrouped'.