Skip to content
This repository

Labels that have 0 values aren't turned into $9.99 #80

Open
wants to merge 1 commit into from

1 participant

Quilted
Quilted

Allows charts to display 0 values in labels by differentiating from null values (which still get turned to $9.99).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 06, 2010
Michelle Moon Lee Edited so 0 values are displayed in labels rather than .99 ff854ed
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 g.raphael.js
6 g.raphael.js
@@ -182,7 +182,7 @@
182 182 Raphael.fn.g.tag = function (x, y, text, angle, r) {
183 183 angle = angle || 0;
184 184 r = r == null ? 5 : r;
185   - text = text == null ? "$9.99" : text;
  185 + text = (text == null && text != 0) ? "$9.99" : text;
186 186 var R = .5522 * r,
187 187 res = this.set(),
188 188 d = 3;
@@ -228,7 +228,7 @@
228 228 Raphael.fn.g.popup = function (x, y, text, dir, size) {
229 229 dir = dir == null ? 2 : dir > 3 ? 3 : dir;
230 230 size = size || 5;
231   - text = text || "$9.99";
  231 + text = (text == null && text != 0) ? "$9.99" : text;
232 232 var res = this.set(),
233 233 d = 3;
234 234 res.push(this.path().attr({fill: "#000", stroke: "#000"}));
@@ -259,7 +259,7 @@
259 259 };
260 260 Raphael.fn.g.flag = function (x, y, text, angle) {
261 261 angle = angle || 0;
262   - text = text || "$9.99";
  262 + text = (text == null && text != 0) ? "$9.99" : text;
263 263 var res = this.set(),
264 264 d = 3;
265 265 res.push(this.path().attr({fill: "#000", stroke: "#000"}));

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.