MarketMap
bqplot.market_map.MarketMap
Bases: DOMWidget
Waffle wrapped map. A MarketMap is not a Mark, it's a custom Figure!
ATTRIBUTE | DESCRIPTION |
---|---|
names |
The elements can also be objects convertible to string primary key for the map data. A rectangle is created for each unique entry in this array
TYPE:
|
groups |
attribute on which the groupby is run. If this is an empty array, then there is no group by for the map.
TYPE:
|
display_text |
data to be displayed on each rectangle of the map.If this is empty it defaults to the names attribute.
TYPE:
|
ref_data |
Additional data associated with each element of the map. The data in this data frame can be displayed as a tooltip.
TYPE:
|
color |
Data to represent the color for each of the cells. If the value of the data is NaN for a cell, then the color of the cell is the color of the group it belongs to in absence of data for color
TYPE:
|
scales |
If the map has data being passed as color, then a corresponding color scale is required
TYPE:
|
axes |
Ability to add an axis for the scales which are used to scale data represented in the map
TYPE:
|
on_hover |
This event is received when the mouse is hovering over a cell. Returns the data of the cell and the ref_data associated with the cell.
TYPE:
|
tooltip_widget |
Widget to be displayed as the tooltip. This can be combined with the on_hover event to display the chart corresponding to the cell being hovered on.
TYPE:
|
tooltip_fields |
names of the fields from the ref_data dataframe which should be displayed in the tooltip.
TYPE:
|
tooltip_formats |
formats for each of the fields for the tooltip data. Order should match the order of the tooltip_fields
TYPE:
|
freeze_tooltip_location |
if True, freezes the location of the tooltip. If False, tooltip will follow the mouse
TYPE:
|
show_groups |
attribute to determine if the groups should be displayed. If set to True, the finer elements are blurred
TYPE:
|
Map Drawing Attributes
ATTRIBUTE | DESCRIPTION |
---|---|
cols |
Suggestion for no of columns in the map.If not specified, value is inferred from the no of rows and no of cells
TYPE:
|
rows |
No of rows in the map.If not specified, value is inferred from the no of cells and no of columns. If both rows and columns are not specified, then a square is constructed basing on the no of cells. The above two attributes are suggestions which are respected unless they are not feasible. One required condition is that, the number of columns is odd when row_groups is greater than 1.
TYPE:
|
row_groups |
No of groups the rows should be divided into. This can be used to draw more square cells for each of the groups
TYPE:
|
Layout Attributes
ATTRIBUTE | DESCRIPTION |
---|---|
map_margin |
Dictionary containing the top, bottom, left and right margins. The user is responsible for making sure that the width and height are greater than the sum of the margins.
TYPE:
|
min_aspect_ratio |
minimum width / height ratio of the figure
TYPE:
|
max_aspect_ratio |
maximum width / height ratio of the figure
TYPE:
|
Display Attributes
ATTRIBUTE | DESCRIPTION |
---|---|
colors |
Colors for each of the groups which are cycled over to cover all the groups
TYPE:
|
title |
Title of the Market Map
TYPE:
|
title_style |
CSS style for the title of the Market Map
TYPE:
|
stroke |
Stroke of each of the cells of the market map
TYPE:
|
group_stroke |
Stroke of the border for the group of cells corresponding to a group
TYPE:
|
selected_stroke |
stroke for the selected cells
TYPE:
|
hovered_stroke |
stroke for the cell being hovered on
TYPE:
|
font_style |
CSS style for the text of each cell
TYPE:
|
Other Attributes
ATTRIBUTE | DESCRIPTION |
---|---|
enable_select |
boolean to control the ability to select the cells of the map by clicking
TYPE:
|
enable_hover |
boolean to control if the map should be aware of which cell is being hovered on. If it is set to False, tooltip will not be displayed
TYPE:
|
!!! Note |
The aspect ratios stand for width / height ratios.
Default min and max aspect ratio are both equal to 16 / 9.
|