Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add labelFontFamily prop #358

Merged
merged 1 commit into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions dist/justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@
// color of label showing label under value
labelFontColor: kvLookup('labelFontColor', config, dataset, "#b3b3b3"),

// valueFontFamily : string
// font-family for label as well as min/max value
labelFontFamily: kvLookup('labelFontFamily', config, dataset, "Arial"),

// shadowOpacity : int
// 0 ~ 1
shadowOpacity: kvLookup('shadowOpacity', config, dataset, 0.2),
Expand Down Expand Up @@ -649,7 +653,7 @@
obj.txtLabel.attr({
"font-size": obj.params.labelFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": "0"
});
Expand All @@ -673,7 +677,7 @@
obj.txtMin.attr({
"font-size": obj.params.minFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": (obj.config.hideMinMax || obj.config.donut) ? "0" : "1"
});
Expand All @@ -696,7 +700,7 @@
obj.txtMax.attr({
"font-size": obj.params.maxFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": (obj.config.hideMinMax || obj.config.donut) ? "0" : "1"
});
Expand Down Expand Up @@ -761,7 +765,7 @@
setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY);
};


this.bindEvent("raphael.anim.finish", onFinish)
this.bindEvent("raphael.anim.frame", onFrame)

Expand Down Expand Up @@ -812,12 +816,12 @@
eventName += '.' + this.level.id

//check for existing bind events
if(this.events[eventName])
if(this.events[eventName])
Raphael.eve.off(eventName, this.events[eventName])

Raphael.eve.on(eventName, func);

this.events[eventName] = func
this.events[eventName] = func
}


Expand Down
2 changes: 1 addition & 1 deletion dist/justgage.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/justgage.min.js.map

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@
// color of label showing label under value
labelFontColor: kvLookup('labelFontColor', config, dataset, "#b3b3b3"),

// valueFontFamily : string
// font-family for label as well as min/max value
labelFontFamily: kvLookup('labelFontFamily', config, dataset, "Arial"),

// shadowOpacity : int
// 0 ~ 1
shadowOpacity: kvLookup('shadowOpacity', config, dataset, 0.2),
Expand Down Expand Up @@ -649,7 +653,7 @@
obj.txtLabel.attr({
"font-size": obj.params.labelFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": "0"
});
Expand All @@ -673,7 +677,7 @@
obj.txtMin.attr({
"font-size": obj.params.minFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": (obj.config.hideMinMax || obj.config.donut) ? "0" : "1"
});
Expand All @@ -696,7 +700,7 @@
obj.txtMax.attr({
"font-size": obj.params.maxFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": (obj.config.hideMinMax || obj.config.donut) ? "0" : "1"
});
Expand Down Expand Up @@ -761,7 +765,7 @@
setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY);
};


this.bindEvent("raphael.anim.finish", onFinish)
this.bindEvent("raphael.anim.frame", onFrame)

Expand Down Expand Up @@ -812,12 +816,12 @@
eventName += '.' + this.level.id

//check for existing bind events
if(this.events[eventName])
if(this.events[eventName])
Raphael.eve.off(eventName, this.events[eventName])

Raphael.eve.on(eventName, func);

this.events[eventName] = func
this.events[eventName] = func
}


Expand Down
18 changes: 11 additions & 7 deletions justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@
// color of label showing label under value
labelFontColor: kvLookup('labelFontColor', config, dataset, "#b3b3b3"),

// valueFontFamily : string
// font-family for label as well as min/max value
labelFontFamily: kvLookup('labelFontFamily', config, dataset, "Arial"),

// shadowOpacity : int
// 0 ~ 1
shadowOpacity: kvLookup('shadowOpacity', config, dataset, 0.2),
Expand Down Expand Up @@ -649,7 +653,7 @@
obj.txtLabel.attr({
"font-size": obj.params.labelFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": "0"
});
Expand All @@ -673,7 +677,7 @@
obj.txtMin.attr({
"font-size": obj.params.minFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": (obj.config.hideMinMax || obj.config.donut) ? "0" : "1"
});
Expand All @@ -696,7 +700,7 @@
obj.txtMax.attr({
"font-size": obj.params.maxFontSize,
"font-weight": "normal",
"font-family": "Arial",
"font-family": obj.config.labelFontFamily,
"fill": obj.config.labelFontColor,
"fill-opacity": (obj.config.hideMinMax || obj.config.donut) ? "0" : "1"
});
Expand Down Expand Up @@ -761,7 +765,7 @@
setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY);
};


this.bindEvent("raphael.anim.finish", onFinish)
this.bindEvent("raphael.anim.frame", onFrame)

Expand Down Expand Up @@ -812,12 +816,12 @@
eventName += '.' + this.level.id

//check for existing bind events
if(this.events[eventName])
if(this.events[eventName])
Raphael.eve.off(eventName, this.events[eventName])

Raphael.eve.on(eventName, func);

this.events[eventName] = func
this.events[eventName] = func
}


Expand Down