Skip to content

Commit 2c1d70d

Browse files
committed
fixed scattergl defaults
1 parent 4fed40e commit 2c1d70d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/traces/scattergl/defaults.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3939
coerce('hovertemplate');
4040
coerce('mode', defaultMode);
4141

42+
coerce('tooltip');
43+
coerce('tooltiptemplate');
44+
4245
if(subTypes.hasMarkers(traceOut)) {
4346
handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noAngleRef: true, noStandOff: true});
4447
coerce('marker.line.width', isOpen || isBubble ? 1 : 0);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"data":
3+
[
4+
{ "type": "scattergl", "mode": "lines", "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "y": [0, 1, 0, 7, 7, 0, 2, 4, 3, 0], "line": { "width": 10, "dash": "solid" },
5+
"tooltiptemplate": "x: %{x}<br>y: %{y}",
6+
"tooltip": {"arrowcolor": "blue"}},
7+
{ "type": "scattergl", "mode": "lines", "y": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "x": [0, 1, 0, 7, 7, 0, 2, 4, 3, 0], "line": { "width": 10, "dash": "solid" },
8+
"tooltiptemplate": "x: %{x}<br>y: %{y}",
9+
"tooltip": {"arrowcolor": "blue"}}
10+
],
11+
"layout": {"width":800, "height":600, "xaxis":{ "range": [-1, 11] }, "yaxis":{ "autorange": "reversed" }, "title": {"text": "simple scatter lines (without markers or text) with reversed ranges"} },
12+
"config": {
13+
"editable": true,
14+
"modeBarButtonsToAdd": [
15+
"tooltip",
16+
"hoverclosest",
17+
"hovercompare",
18+
"togglespikelines"
19+
],
20+
"displaylogo": false,
21+
"displayModeBar": true
22+
}
23+
}

0 commit comments

Comments
 (0)