include zero values in the tooltip

This commit is contained in:
Manas Solanki 2017-11-03 22:13:15 +05:30 committed by pratu16x7
parent 0bea3bbb78
commit 4c63fac514
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 : '' }`
});