Is there a way to draw with `JavaScript Charts` even if there are zero search results?

Yakitama shared this question 16 months ago
Answered

In JavaScript Charts, the `generateChart` method did not seem to be reached when there were zero data results.


・Charts in JavaScript

generateChart = function (options) {
    // ! setting debugger
    debugger;
    
    const isEmpty = true;
    if (isEmpty) {
        // Empty charts
    } else {
        // Charts
    }
}


Is there a way to draw with `JavaScript Charts` even if there are zero search results?

Replies (6)

photo
2

Hello Yakitama,

I hope all is well,

We have looked into this and we would like to know few things which will help us to assist you further.

1. Could you please exactly confirm what you're looking for? As we can see code shared by you which comes in JavaScript chart as default.

2. We also recommend checking below wiki link which will guide you that How the generateChart function works.

JavaScript Charts - Yellowfin Guide 9 - Global Site (yellowfinbi.com)


Regards

Nishant

photo
1

What I want to do is to do a JavaScript rendering even if the result of the `dataSet` is empty.

If the data is empty, an empty message is displayed without stopping at the `debugger;` position in the code described.


Therefore, Is there a way to draw with `JavaScript Charts` even if there are zero search results?

photo
photo
1

What I want to do is to do a JavaScript rendering even if the result of the `dataSet` is empty.

If the data is empty, an empty message is displayed without stopping at the `debugger;` position in the code described.


Therefore, Is there a way to draw with `JavaScript Charts` even if there are zero search results?

photo
1

Hello Yakitama,

Apologies for delay response,

I just wanted to touchbase to see if you're still looking for assistance here.

javascript - chart js: when all the values passed to data are zeros, nothing is showing - Stack Overflow

Above link gives an overview on JavaScript rendering.


Regards

Nishant

photo
1

Hello Yakitama,

I hope all is well,

I just want to touch base to see if you had chance to read through my response. If you can let me know that would be great.


Regards

Nishant

photo
1

Hello Yakitama,

I hope all is well,

I just want to touch base to see if you had chance to read through my response. If you can let me know that would be great.


Regards

Nishant

photo
1

Hello Yakitama,

I hope all is well,

I'll be closing this Question due to inactivity. Going forward with this if you have any issues around this, please let me know, I will be more than happy to assist where I can.


Regards

Nishant

Leave a Comment
 
Attach a file