A MetadataGenerator is used with the builder api to provide metadata when it is unecessary or impossible to provide it all as pure data
Case 1: You want to use the same metadata object for all data points (eg to enable data point selection). getSingleMetadata will be called to populate metadata for each data point added.
Case 2: You want to use a class for metadata that contains logic that cannot be serialized. Use I1DMetadataGenerator (or I2DMetadataGenerator for heatmap data). getMetadata will be called to populate the metadata.
A MetadataGenerator is used with the builder api to provide metadata when it is unecessary or impossible to provide it all as pure data Case 1: You want to use the same metadata object for all data points (eg to enable data point selection). getSingleMetadata will be called to populate metadata for each data point added. Case 2: You want to use a class for metadata that contains logic that cannot be serialized. Use I1DMetadataGenerator (or I2DMetadataGenerator for heatmap data). getMetadata will be called to populate the metadata.