Improve styling
This commit is contained in:
parent
14dd25c778
commit
b88721c7a0
1 changed files with 12 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { withComponent, props } from 'skatejs';
|
import { withComponent, props } from 'skatejs';
|
||||||
import { Timeseries } from '../lib/timeseries';
|
import { Timeseries } from '../lib/timeseries';
|
||||||
import injectCss from '../lib/plotly-shadowdom';
|
import injectCss from '../lib/plotly-shadowdom';
|
||||||
|
import { colors } from '../lib/colors';
|
||||||
|
|
||||||
const Component = withComponent();
|
const Component = withComponent();
|
||||||
|
|
||||||
|
@ -53,8 +54,7 @@ class Heatmap extends Component {
|
||||||
type: 'heatmap',
|
type: 'heatmap',
|
||||||
colorscale: [
|
colorscale: [
|
||||||
['0.0', 'rgb(0, 0, 0)'],
|
['0.0', 'rgb(0, 0, 0)'],
|
||||||
['0.9', 'rgb(255, 0, 0)'],
|
['1.0', colors[2]],
|
||||||
['1.0', 'rgb(128, 0, 0)'],
|
|
||||||
],
|
],
|
||||||
showlegend: false,
|
showlegend: false,
|
||||||
showscale: false,
|
showscale: false,
|
||||||
|
@ -68,18 +68,27 @@ class Heatmap extends Component {
|
||||||
tickfont: {
|
tickfont: {
|
||||||
family: 'Source Code Pro',
|
family: 'Source Code Pro',
|
||||||
},
|
},
|
||||||
|
tickcolor: '#204a87',
|
||||||
|
gridcolor: '#204a87',
|
||||||
},
|
},
|
||||||
xaxis: {
|
xaxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
tickfont: {
|
tickfont: {
|
||||||
family: 'Source Code Pro',
|
family: 'Source Code Pro',
|
||||||
},
|
},
|
||||||
|
tickcolor: '#204a87',
|
||||||
|
gridcolor: '#204a87',
|
||||||
|
},
|
||||||
|
font: {
|
||||||
|
family: ['Source Code Pro', 'sans-serif'],
|
||||||
|
size: 16,
|
||||||
|
color: '#fff',
|
||||||
|
outlineColor: 'transparent',
|
||||||
},
|
},
|
||||||
paper_bgcolor: 'transparent',
|
paper_bgcolor: 'transparent',
|
||||||
margin: {
|
margin: {
|
||||||
r: 0,
|
r: 0,
|
||||||
t: 0,
|
t: 0,
|
||||||
b: 0,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
Plotly.newPlot(el, graphData, layout, {
|
Plotly.newPlot(el, graphData, layout, {
|
||||||
|
|
Loading…
Add table
Reference in a new issue