visualization

package
v0.0.0-...-50ff0a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package visualization has the collection of visualizations and its utilities for the platform

Index

Constants

View Source
const (
	//TableType is the table type of visualization
	TableType = "TABLE"
	//LineChartType is the line chart type of visualization
	LineChartType = "LINECHART"
	//ColumnChartType is the column chart type of visualization
	ColumnChartType = "COLUMNCHART"
	//PieChartType is the pie chart type of visualization
	PieChartType = "PIECHART"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	//ResourceID of the item which is represented by the metric
	ResourceID string `json:"resource_id,omitempty"`
	//DisplayName is the name to be used as a display
	DisplayName string `json:"display_name,omitempty"`
	//Name of the actual item in the data
	Name string `json:"name,omitempty"`
	//Measure flag states whether the metric is a measure type value
	Measure bool `json:"measure,omitempty"`
	//Dimension flag states whether the metric is a dimension type value
	Dimension bool `json:"dimension,omitempty"`
}

Metric holds the information about an metric to be used in the visualization

type Visualization

type Visualization struct {
	//Metrics holds the information about the metrics to be used in a visualization
	Metrics []Metric `json:"metrics,omitempty"`
	//Type indicates the type of the visualization
	Type string `json:"type,omitempty"`
	//Title of the visualization
	Title string `json:"title,omitempty"`
	//Description of the visualization
	Description string `json:"description,omitempty"`
}

Visualization has the information about a visualization

func ColumnChart

func ColumnChart(q *interpreter.Query) Visualization

ColumnChart will return a column visualization for a given query

func LineChart

func LineChart(q *interpreter.Query) Visualization

LineChart will return a line visualization for a given query

func PieChart

func PieChart(q *interpreter.Query) Visualization

PieChart will return a pie visualization for a given query

func SuggestVisualization

func SuggestVisualization(q *interpreter.Query) Visualization

SuggestVisualization suggests the visualization to be used for the query

func Table

Table will return a table visualization for a given query

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL