Gold872 / elastic-dashboard

A simple and modern dashboard for FRC
MIT License
74 stars 14 forks source link

Multi-topic graphs #80

Closed DanPeled closed 1 month ago

DanPeled commented 1 month ago

ive been trying to implement multi-topic graphs for elastic, but have got into an issue, when i add the other graph it bugs out, i may be using the graph addition wrong, what i have done it create a list of the FastLineSeriers i add instead of adding one manually, but it seems to be erasing the graph, not sure how to describe that

code :

for (var topic in _additionalTopics) {
      logger.info(topic);
      List<_GraphPoint> points = handleAdditionalTopics(topic);
      list.add(FastLineSeries<_GraphPoint, num>(
        name: topic,
        animationDuration: 0.0,
        animationDelay: 0.0,
        sortingOrder: SortingOrder.ascending,
        color: const Color.fromARGB(255, 69, 71, 73),
        width: widget.lineWidth,
        dataSource: points,
        xValueMapper: (value, index) => value.x,
        yValueMapper: (value, index) => value.y,
        sortFieldValueMapper: (datum, index) => datum.x,
      ));
    }

image

fork: https://github.com/DanPeled/dashboard-rewrite/blob/multitopic_graph/lib/widgets/nt_widgets/single_topic/graph.dart