Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article provides an overview of the output structure for a Monitor/Test within ModelOp Center.

Table of Contents

Table of Contents

Custom Monitor Output - Charts, Graphs, Tables

To have the results of your custom monitor displayed as a Bar Graph, Line Chart, or Table, the output of your metrics function should leverage the following format:

Code Block
  	"time_line_graph": {
	  "title" : "Example Line Graph - Timeseries Data",
	  "x_axis_label": "X Axis",
	  "y_axis_label": "Y Axis",
	  "data": {
		"data1": [["2023-02-27T20:10:20",100], ["2023-03-01T20:10:20",200], ["2023-03-03T20:10:20", 300]],
		"data2": [["2023-02-28T20:10:20", 350], ["2023-03-02T20:10:20", 250], ["2023-03-04T20:10:20", 150]]
	  }
	},
  "generic_line_graph": {
	"title" : "Example Line Graph - XY Data",
	"x_axis_label": "X Axis",
	"y_axis_label": "Y Axis",
	"data": {
	  "data1": [[1,100], [3,200], [5, 300]],
	  "data2": [[2, 350], [4, 250], [6, 150]]
	}
  },
  "decimal_line_graph": {
	"title" : "Example Line Graph - Decimal Data",
	"x_axis_label": "X Axis",
	"y_axis_label": "Y Axis",
	"data": {
	  "data1": [[1,1.23], [3,2.456], [5, 3.1415]],
	  "data2": [[2, 4.75], [4, 2.987], [6, 1.375]]
	}
  },
  "generic_bar_graph": {
	"title" : "Example Bar Chart",
	"x_axis_label": "X Axis",
	"y_axis_label": "Y Axis",
	"rotated": false,
	"data" : {
	  "data1": [1, 2, 3, 4],
	  "data2": [4, 3, 2, 1]
	},
	"categories": ["cat1", "cat2", "cat3", "cat4"]
  },
  "horizontal_bar_graph": {
	"title" : "Example Bar Chart",
	"x_axis_label": "X Axis",
	"y_axis_label": "Y Axis",
	"rotated": true,
	"data" : {
	  "data1": [1, 2, 3, 4],
	  "data2": [4, 3, 2, 1]
	},
	"categories": ["cat1", "cat2", "cat3", "cat4"]
  },
  "generic_table": [
	  {"data1" : 1, "data2" : 2, "data3" : 3},
	  {"data1" : 2, "data2" : 3, "data3": 4},
	  {"data1" :  3, "data2" : 4, "data3" : 5}
	]
Next Article: /wiki/spaces/dv33/pages/1978437047
,
  "generic_scatter_plot": {
        "title": "Example Scatter Plot",
        "x_axis_label": "X Axis",
        "y_axis_label": "Y Axis",
        "type": "scatter",
        "data": {
            "data1": [[1,100], [3, 200], [5, 300], [2,101], [1,105], [1, 320], [2,90], [2,85], [6, 300]],
            "data2": [[2, 350], [4, 250],[6, 150],[1,101], [1,125], [1, 300], [4, 90], [4, 85], [4, 300]]
        }
    },
    "generic_pie_chart": {
        "title": "Example Pie Chart",
        "type": "pie",
        "data": {
            "data1": [
                1,
                2,
                3,
                4
            ],
            "data2": [
                4,
                3,
                2,
                1
            ],
            "data3": [
                2,
                1
            ],
            "data4": [
                1
            ]
        }
    },
    "generic_donut_chart": {
        "title": "Example Donut Chart",
        "type": "donut",
        "data": {
            "data1": [
                1,
                2,
                3,
                4
            ],
            "data2": [
                4,
                3,
                2,
                1
            ],
            "data3": [
                2,
                1
            ],
            "data4": [
                1
            ]
        }
    }

Next Article: Documentation Generation >