Skip to content

Commit d606511

Browse files
committed
Merge branch 'master' into new-plot-new-canvas
2 parents a60517c + 0312664 commit d606511

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

shelly/plotlyjs/static/plotlyjs/src/graph_obj.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,6 +1653,9 @@ plots.fontAttrs = {
16531653
}
16541654
};
16551655

1656+
// TODO make this a plot attribute?
1657+
plots.fontWeight = 'normal';
1658+
16561659
var extendFlat = Plotly.Lib.extendFlat;
16571660

16581661
plots.layoutAttributes = {
@@ -2933,9 +2936,14 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
29332936
Plotly.Lib.swapAttrs(cont, ['?', '?src'], 'values', valuesTo);
29342937

29352938
if(oldVal === 'pie') {
2939+
Plotly.Lib.nestedProperty(cont, 'marker.color')
2940+
.set(Plotly.Lib.nestedProperty(cont, 'marker.colors').get());
2941+
29362942
// super kludgy - but if all pies are gone we won't remove them otherwise
29372943
fullLayout._pielayer.selectAll('g.trace').remove();
29382944
} else if(plots.traceIs(cont, 'cartesian')) {
2945+
Plotly.Lib.nestedProperty(cont, 'marker.colors')
2946+
.set(Plotly.Lib.nestedProperty(cont, 'marker.color').get());
29392947
//look for axes that are no longer in use and delete them
29402948
flagAxForDelete[cont.xaxis || 'x'] = true;
29412949
flagAxForDelete[cont.yaxis || 'y'] = true;
@@ -4343,7 +4351,8 @@ plots.titles = function(gd, title) {
43434351
'font-family': font,
43444352
'font-size': d3.round(fontSize,2)+'px',
43454353
fill: Plotly.Color.rgb(fontColor),
4346-
opacity: opacity*Plotly.Color.opacity(fontColor)
4354+
opacity: opacity*Plotly.Color.opacity(fontColor),
4355+
'font-weight': plots.fontWeight
43474356
})
43484357
.attr(options)
43494358
.call(Plotly.util.convertToTspans)

shelly/plotlyjs/static/plotlyjs/src/plotly.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ exports.Queue = require('./queue');
6666

6767
// exports d3 used in the bundle
6868
exports.d3 = require('d3');
69+
70+
// custom styling injected via envify/uglifyify
71+
if(process.env.PLOTLY_CUSTOM_STYLE === "open-office-2015") {
72+
require('./styles/open_office_2015')();
73+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use strict';
2+
3+
var Plotly = require('../plotly');
4+
5+
module.exports = function updateStyle() {
6+
Plotly.Color.defaults = [
7+
'#CC0000', '#5E6A71', '#BBDDE7', '#55aab2', '#a4b0b7'
8+
];
9+
10+
Plotly.Plots.layoutAttributes.font.family.dflt = '"Overpass", verdana, arial, sans-serif';
11+
12+
Plotly.Plots.fontWeight = 900;
13+
};

test-dashboard/toolpanel-dashboard/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
<!-- ToolPanel JS dependencies Bundle -->
1818
<script type="text/javascript" src="./../../shelly/toolpanel/static/toolpanel/dist/toolpanel-dependencies-bundle.js"></script>
1919

20-
<!-- ToolPanel Standalone JS Bundle -->
21-
<script type="text/javascript" src="./../../shelly/toolpanel/static/toolpanel/dist/toolpanel-standalone-bundle.js"></script>
22-
2320
<!-- PlotlyJS Bundle -->
2421
<script type="text/javascript" src="./../../shelly/plotlyjs/static/plotlyjs/build/plotlyjs-bundle.js"></script>
2522

23+
<!-- ToolPanel Standalone JS Bundle -->
24+
<script type="text/javascript" src="./../../shelly/toolpanel/static/toolpanel/dist/toolpanel-standalone-bundle.js"></script>
25+
2626
<!-- UI Stuff -->
2727
<script type="text/javascript" src="ui.js"></script>
2828

0 commit comments

Comments
 (0)