Merge pull request #33 from manassolanki/add-zero-also

Also show zero value in the tooltip
This commit is contained in:
Prateeksha Singh 2017-11-05 11:56:38 +05:30 committed by GitHub
commit bb2aeaa777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 66 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "charts",
"name": "frappe-charts",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,

View File

@ -22,7 +22,7 @@ export default class BaseChart {
}) {
this.raw_chart_args = arguments[0];
this.parent = typeof parent === 'String' ? document.querySelector(parent) : parent;
this.parent = typeof parent === 'string' ? document.querySelector(parent) : parent;
this.title = title;
this.subtitle = subtitle;

View File

@ -60,7 +60,7 @@ export default class SvgTip {
this.list_values.map((set) => {
let li = $.create('li', {
className: `border-top ${set.color || 'black'}`,
innerHTML: `<strong style="display: block;">${set.value ? set.value : '' }</strong>
innerHTML: `<strong style="display: block;">${ isNaN(set.value) ? '' : set.value }</strong>
${set.title ? set.title : '' }`
});