field_graph_interface
A graph gadget allows to display various types of graph (lines, bars, 3D, etc)
- render
- render a graph
- option_dict
-
Schema available here : gadget_field_graph_interface_html_schema.json
Generic graph gadget. The purpose of this gadget is to provide an unique
API for various charting libraries
Please see json schema for supported parameters.
Options were inspired by https://plot.ly/javascript/ which supports various types
of charts.
For axis, typically, on a scatter:
- axis 0 would be mapped to x
- axis 1 would be mapped to y
For a 3D surface, we would have :
- axis 0 would be mapped to x
- axis 1 would be mapped to y
- axis 2 would be mapped to z
Example of options:
{value:
{data: [{ value_dict: {"0": [0, 1, 2],
"1": [0, 1, 4]
},
type: "scatter",
label_list: ["First Point", "Second Point", "Third Point"],
axis_mapping_id_dict: {"1": "1_1"},
title: "first data set"
},
{ value_dict: {"0": [0, 1, 3],
"1": [0, 10, 40]
},
type: "scatter",
title: "second data set",
axis_mapping_id_dict: {"1": "1_2"}
}
],
layout: {axis_dict : {"0": {"title": "x axis label", "scale_type": "linear", "value_type": "number"},
"1_1": {"title": "y axis label for first data set", "scale_type": "log", "side" : "left"},
"1_2": {"title": "y axis label for second data set", "position": "right"}
},
title: "Title for my global graph"}
}
}