Commit d8c3f907 authored by Sanjay Yadav's avatar Sanjay Yadav

DOC: Updated documentation.

parent d5e590f5
Pipeline #32577 passed with stage
in 1 minute and 9 seconds
...@@ -455,36 +455,36 @@ edit-charts: # Rule name ...@@ -455,36 +455,36 @@ edit-charts: # Rule name
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Column Chart Name: Column Chart Name:
chart: chart:
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Line Chart Name: Line Chart Name:
chart: chart:
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Area Chart Name: # Name of the chart shape. Case sensitive Area Chart Name: # Name of the chart shape. Case sensitive
chart: chart:
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] # Use sales data data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] # Use sales data
x: Category # The x-axis is the Category column. Other columns are Y-axis values x: Category # The x-axis is the Category column. Other columns are Y-axis values
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
opacity: 0.50 # Constant opacity for all lines opacity: 0.50 # Constant opacity for all lines
Scatter Chart Name: Scatter Chart Name:
...@@ -492,9 +492,9 @@ edit-charts: # Rule name ...@@ -492,9 +492,9 @@ edit-charts: # Rule name
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Bubble Chart Name: Bubble Chart Name:
chart: chart:
...@@ -502,36 +502,36 @@ edit-charts: # Rule name ...@@ -502,36 +502,36 @@ edit-charts: # Rule name
x: Category x: Category
size: Growth # Optional: Column name from data for the size of the bubbles, if not defined default size will be 1 size: Growth # Optional: Column name from data for the size of the bubbles, if not defined default size will be 1
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Radar Chart Name: Radar Chart Name:
chart: chart:
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Donut Chart Name: Donut Chart Name:
chart: chart:
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
Pie Chart Name: Pie Chart Name:
chart: chart:
data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']] data: data['sales'][['Category', 'Sales', 'Profit', 'Growth']]
x: Category x: Category
color: # Define colors color: # Define colors
Sales: #D73027 # Specify color of sales line in 6-digit hex Sales: '#D73027' # Specify color of sales line in 6-digit hex
Profit: #1A9850 # Specify color of profit line Profit: '#1A9850' # Specify color of profit line
Growth: #cccccc # Specify color of profit line Growth: '#cccccc' # Specify color of profit line
``` ```
The following keys can also be specified as an [expression](#expressions) and python functions: The following keys can also be specified as an [expression](#expressions) and python functions:
...@@ -570,28 +570,29 @@ the chart. ...@@ -570,28 +570,29 @@ the chart.
Example: Example:
:::yaml ```yaml
draw-bullet: draw-bullet:
Bullet Rectangle: Bullet Rectangle:
bullet: bullet:
data: data['bullet_data']['data'].ix[0] data: data['bullet_data']['data'].ix[0]
poor: data['bullet_data']['poor'].ix[0] poor: data['bullet_data']['poor'].ix[0]
good: data['bullet_data']['good'].ix[0] good: data['bullet_data']['good'].ix[0]
target: data['bullet_data']['target'].ix[0] target: data['bullet_data']['target'].ix[0]
average: data['bullet_data']['average'].ix[0] average: data['bullet_data']['average'].ix[0]
orient: horizontal orient: horizontal
gradient: 'Oranges' gradient: 'Oranges'
text: text:
function: "lambda v: '%.1f' % v" function: "lambda v: '%.1f' % v"
style: style:
font-size: 10 # Common css for all items(data, target, poor, good and average) font-size: 10 # Common css for all items(data, target, poor, good and average)
color: '#ff0000' color: '#ff0000'
data: # Overwriting CSS for data data: # Overwriting CSS for data
font-size: 12 font-size: 12
fill: #ff00ff fill: #ff00ff
target: # Overwriting CSS for target target: # Overwriting CSS for target
font-size: 12 font-size: 12
color: '#cccccc' color: '#cccccc'
```
The following keys can also be specified as an [expression](#expressions) and python functions: The following keys can also be specified as an [expression](#expressions) and python functions:
`data:`, `target:`, `poor:`, `good:`, `average:`, `gradient`, `text` along will all style properties such as under style section `font-size`, `opacity`, `fill`, `color` etc. `data:`, `target:`, `poor:`, `good:`, `average:`, `gradient`, `text` along will all style properties such as under style section `font-size`, `opacity`, `fill`, `color` etc.
...@@ -610,19 +611,20 @@ The following keys can also be specified as an [expression](#expressions) and py ...@@ -610,19 +611,20 @@ The following keys can also be specified as an [expression](#expressions) and py
Example: Example:
:::yaml ```yaml
draw-calendar: draw-calendar:
Calendar Rectangle: Calendar Rectangle:
calendarmap: calendarmap:
data: data:
function: data['calendar_data'].sort_values(by=['date_time']).set_index('date_time')['random_column'] function: data['calendar_data'].sort_values(by=['date_time']).set_index('date_time')['random_column']
width: 40 width: 40
weekstart: 6 weekstart: 6
label_top: 80 label_top: 80
label_left: 80 label_left: 80
startdate: data.index[0] startdate: data.index[0]
style: style:
color: '#000000' color: '#000000'
```
The following keys can also be specified as an [expression](#expressions) and python functions: The following keys can also be specified as an [expression](#expressions) and python functions:
`data:`, `startdate:`, `lo:`, `hi:`, `weekstart:` and subelements of `style` section. `data:`, `startdate:`, `lo:`, `hi:`, `weekstart:` and subelements of `style` section.
...@@ -643,26 +645,27 @@ The following keys can also be specified as an [expression](#expressions) and py ...@@ -643,26 +645,27 @@ The following keys can also be specified as an [expression](#expressions) and py
Example: Example:
:::yaml ```yaml
draw-heatgrid: draw-heatgrid:
Heatgrid Rectangle: Heatgrid Rectangle:
heatgrid: heatgrid:
data: data['heatgrid_data'] data: data['heatgrid_data']
row: name row: name
column: hour column: hour
value: value value: value
text: True text: True
left-margin: 0.20 left-margin: 0.20
cell-width: 30 cell-width: 30
cell-height: 30 cell-height: 30
na-text: NA na-text: NA
na-color: '#cccccc' na-color: '#cccccc'
style: style:
gradient: RdYlGn gradient: RdYlGn
color: '#ff0000' color: '#ff0000'
font-size: 14 font-size: 14
margin: 10 margin: 10
text-align: center text-align: center
```
The following keys can also be specified as an [expression](#expressions) and python functions: The following keys can also be specified as an [expression](#expressions) and python functions:
`data:`, `row:`, `column:`, `value:` and subelements of `style` section. `data:`, `row:`, `column:`, `value:` and subelements of `style` section.
...@@ -679,20 +682,21 @@ The following keys can also be specified as an [expression](#expressions) and py ...@@ -679,20 +682,21 @@ The following keys can also be specified as an [expression](#expressions) and py
Example: Example:
:::yaml ```yaml
draw-sankey: draw-sankey:
Sankey Rectangle: Sankey Rectangle:
sankey: sankey:
data: data['sankey_data'] data: data['sankey_data']
sort: True sort: True
text: text:
function: "lambda g: g.sum().apply(lambda v: 'Node %s' % (v.name,), axis=1)" function: "lambda g: g.sum().apply(lambda v: 'Node %s' % (v.name,), axis=1)"
order: order:
function: "lambda g: -g['D'].sum() / g['E'].sum()" function: "lambda g: -g['D'].sum() / g['E'].sum()"
color: color:
function: "lambda g: _color.gradient(g['D'].sum() / g['E'].sum() * 2 - 1, _color.RdYlGn)" function: "lambda g: _color.gradient(g['D'].sum() / g['E'].sum() * 2 - 1, _color.RdYlGn)"
groups: ['A', 'B', 'C'] groups: ['A', 'B', 'C']
stroke: '#ffffff' stroke: '#ffffff'
```
The following keys can also be specified as an [expression](#expressions) and python functions: The following keys can also be specified as an [expression](#expressions) and python functions:
`data:`, `size:`, `order:`, `text:`, `color`. `data:`, `size:`, `order:`, `text:`, `color`.
...@@ -709,21 +713,22 @@ The following keys can also be specified as an [expression](#expressions) and py ...@@ -709,21 +713,22 @@ The following keys can also be specified as an [expression](#expressions) and py
Example: Example:
:::yaml ```yaml
draw-treemap: draw-treemap:
Treemap Rectangle: Treemap Rectangle:
treemap: treemap:
data: data['treemap_data'] data: data['treemap_data']
keys: ['A', 'B'] keys: ['A', 'B']
values: "{'C': 'sum', 'D': 'sum'}" values: "{'C': 'sum', 'D': 'sum'}"
size: size:
function: "lambda v: v['C']" function: "lambda v: v['C']"
sort: sort:
function: "lambda v: v.sort_values(by=['C'], ascending=False)" function: "lambda v: v.sort_values(by=['C'], ascending=False)"
color: color:
function: "lambda v: _color.gradient(v['C'] / v['D'] - 1, _color.RdYlGn)" function: "lambda v: _color.gradient(v['C'] / v['D'] - 1, _color.RdYlGn)"
text: text:
function: "lambda v: 'Num %d' % v['index']" function: "lambda v: 'Num %d' % v['index']"
```
The following keys can also be specified as an [expression](#expressions) and python functions: The following keys can also be specified as an [expression](#expressions) and python functions:
`data:`, `size:`, `keys:`, `values:`, `sort`, `color`, `text`. `data:`, `size:`, `keys:`, `values:`, `sort`, `color`, `text`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment