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

feat: add message for empty charts #164

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

valeriesauer
Copy link

General Summary

Description

Added a "No Data available" message when the chart contains no data. The message is rendered in the chart when all dataset values are 0 or empty

Related Issue

#160 (comment)

@@ -391,15 +394,23 @@
* @param responseStore - the response store
*/
const setChartData = (responseStore: ResponseStore): void => {
if (responseStore.size === 0) return;
if (responseStore.size === 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is not correct, when the responseStore is empty it should be the "empty charts" look like the initial load. If the Store has results but not regarding this Diagramm then it should show the text

@@ -589,6 +600,11 @@
{#if options.hintText}
<InfoButtonComponent message={options.hintText} />
{/if}

{#if noDataAvailable}
<p>No Data Available</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make it less aggressive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants