10000 gauge: rename circular to angular · keithrob/plotly.js@a554ff7 · GitHub
[go: up one dir, main page]

Skip to content

Commit a554ff7

Browse files
committed
gauge: rename circular to angular
1 parent c2b5af4 commit a554ff7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/traces/indicator/attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ module.exports = {
128128
valType: 'enumerated',
129129
editType: 'style',
130130
role: 'style',
131-
dflt: 'circular',
132-
values: ['circular', 'bullet'],
131+
dflt: 'angular',
132+
values: ['angular', 'bullet'],
133133
description: [
134134
'Set the shape of the gauge'
135135
].join(' ')

src/traces/indicator/plot.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = function plot(gd, cdModule, transitionOpts, makeOnCompleteCallb
7878
var hasGauge = trace.mode.indexOf('gauge') !== -1;
7979

8080
// circular gauge
81-
var isCircular = hasGauge && trace.gauge.shape === 'circular';
81+
var isAngular = hasGauge && trace.gauge.shape === 'angular';
8282
var theta = Math.PI / 2;
8383
var radius = Math.min(size.w / 2, size.h * 0.75);
8484
var innerRadius = cn.innerRadius * radius;
@@ -119,7 +119,7 @@ module.exports = function plot(gd, cdModule, transitionOpts, makeOnCompleteCallb
119119
}
120120
labelFontSize = 0.35 * mainFontSize;
121121
} else {
122-
if(isCircular) {
122+
if(isAngular) {
123123
bignumberVerticalMargin = size.t + size.h;
124124
if(!isWide) bignumberVerticalMargin -= (size.h - radius) / 2;
125125
// TODO: check formatted size of the number
@@ -156,7 +156,7 @@ module.exports = function plot(gd, cdModule, transitionOpts, makeOnCompleteCallb
156156
x: bignumberX,
157157
y: bignumberVerticalMargin,
158158
'text-anchor': 'middle',
159-
'alignment-baseline': isCircular ? 'bottom' : 'central'
159+
'alignment-baseline': isAngular ? 'bottom' : 'central'
160160
})
161161
.call(Drawing.font, trace.font)
162162
.style('font-size', mainFontSize);
@@ -211,7 +211,7 @@ module.exports = function plot(gd, cdModule, transitionOpts, makeOnCompleteCallb
211211
name.exit().remove();
212212

213213
// Draw circular gauge
214-
data = cd.filter(function() {return isCircular;});
214+
data = cd.filter(function() {return isAngular;});
215215
var gauge = d3.select(this).selectAll('g.gauge').data(data);
216216
gauge.enter().append('g').classed('gauge', true);
217217
gauge.attr('transform', 'translate(' + centerX + ',' + bignumberVerticalMargin + ')');

src/traces/indicator/style.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
var d3 = require('d3');
1212

13-
function styleOne() {
14-
return true;
15-
}
13+
// function styleOne() {
14+
// return true;
15+
// }
1616

1717
module.exports = function style(gd) {
1818
gd._fullLayout._indicatorlayer.selectAll('.trace').each(function(cd) {

0 commit comments

Comments
 (0)
0