Skip to content

Commit

Permalink
Move and rename the function to gauge.label.extents
Browse files Browse the repository at this point in the history
  • Loading branch information
EspadaV8 committed May 20, 2016
1 parent 8223963 commit 78eece7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions htdocs/samples/chart_gauge.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
// format: function(value, ratio) {
// return value;
// },
// extents: function (value, isMax) {
// return value + '%';
// },
// show: false // to turn off the min/max labels.
},
// min: 0, // 0 is default, //can handle negative min e.g. vacuum / voltage / current flow / rate of change
// max: 100, // 100 is default
// minmaxformat: function (value, isMax) {
// return value + '%';
// },
// units: ' %',
// width: 39 // for adjusting arc thickness
},
Expand Down
6 changes: 3 additions & 3 deletions src/arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ c3_chart_internal_fn.textForArcLabel = function (d) {

c3_chart_internal_fn.textForGaugeMinMax = function (value, isMax) {
var $$ = this,
format = $$.getGaugeMinMaxFormat();
format = $$.getGaugeLabelExtents();

return format ? format(value, isMax) : value;
};
Expand Down Expand Up @@ -241,9 +241,9 @@ c3_chart_internal_fn.getArcLabelFormat = function () {
return format;
};

c3_chart_internal_fn.getGaugeMinMaxFormat = function () {
c3_chart_internal_fn.getGaugeLabelExtents = function () {
var $$ = this, config = $$.config;
return config.gauge_minmaxformat;
return config.gauge_label_extents;
};

c3_chart_internal_fn.getArcTitle = function () {
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
gauge_min: 0,
gauge_max: 100,
gauge_startingAngle: -1 * Math.PI/2,
gauge_minmaxformat: undefined,
gauge_label_extents: undefined,
gauge_units: undefined,
gauge_width: undefined,
gauge_expand: {},
Expand Down

0 comments on commit 78eece7

Please sign in to comment.