Skip to content

Feature: show extra data for nodes and flows in the diagram #23

@jsolaas

Description

@jsolaas

We want to be able to show extra data for nodes and flows in the diagram

  • We need a separate data object containing the information. This should be a map from node id to the data
  • The data should be used to set the width of the flows creating a sankey diagram
  • We might also want to display some numbers from the data on the nodes directly
  • The data is time-based. The timeline should use these timesteps instead of the current steps/continual. The selected datetime should be used to get the current value for the nodes

The structure of this data will probably be something like this (TBD):

const test: DiagramData = {
  timesteps: ['01.01.2020', '01.01.2021'],
  nodes: {
    'node id 1': [{value1: 8, value2: 6}], // matched with timesteps on index
  }
}

interface DataPoint {
  value: number;
  unit: string;
}

interface NodeData {
  value1: number, // Might want to use DataPoint instead to include info such as unit.
  value2: number,
}

interface DiagramData {
  timesteps: string[];
  nodes: {[nodeId: string]: NodeData[]}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions