Skip to content

Conversation

alexfauquette
Copy link
Member

Fix #10785

image

@alexfauquette alexfauquette added the scope: charts Changes related to the charts. label Oct 25, 2023
@mui-bot
Copy link

mui-bot commented Oct 25, 2023

Deploy preview: https://deploy-preview-10801--material-ui-x.netlify.app/

Updated pages:

Generated by 🚫 dangerJS against 816c4a5

@alexfauquette alexfauquette requested a review from LukasTy October 25, 2023 11:02
Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Nice improvement! 👍
WDYT about improving it further to remove the amibiguity between no data and 0 data? 🤔
IMHO, I would expect to see no MarkPlot as well as no entry in the tooltip given a null value, to clearly identify that "there is no data here". WDYT?
Screenshot 2023-10-25 at 14 48 52

@LukasTy LukasTy added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label Oct 25, 2023
alexfauquette and others added 2 commits October 25, 2023 14:40
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
@alexfauquette
Copy link
Member Author

alexfauquette commented Oct 25, 2023

I would expect to see no MarkPlot as well as no entry in the tooltip given a null value, to clearly identify that "there is no data here". WDYT?

I don't know both make sense. There is already a difference since null shows nothing, and 0 shows "0". In your screenshot, the purple mark at 0 should not exist. I forgot to update the highlight plot component.

I will add a props to the tooltip to customize whet is display if no data available

Found easier solution: if the formatted value is null don't show the line. Otherwise show the formatted value

@@ -52,6 +52,16 @@ By default, they are stacked in the order you defined them, with positive values

For more information, see [stacking docs](/x/react-charts/stacking/).

## Missing data
Copy link
Member

Choose a reason for hiding this comment

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

Another sentence explaining that shorter daŧa will automatically filled with null could be nice

Copy link
Member Author

Choose a reason for hiding this comment

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

They are not, it's just that data[10] returns undefined if data has less than 10 items.

Basically it's the reason why I use == instead of ===

Copy link
Member

Choose a reason for hiding this comment

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

OK technically they are not filled.
But my point is just that we suppor correctly data of different length, we can see it in the example, but the text does not make it clear.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 It was to be sure that it's not an issue for you that I play with those undefined/null distinction

Copy link
Member

@flaviendelangle flaviendelangle Oct 25, 2023

Choose a reason for hiding this comment

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

I don't have a good enough understanding of the charts DX to have a good opinion here.

For me undefined and null don't have the same meaning so it make sense to differentiate them.

Co-authored-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Really great improvement, nice work! 💯 👏

alexfauquette and others added 2 commits October 25, 2023 15:56
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
alexfauquette and others added 2 commits October 25, 2023 16:09
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: charts Changes related to the charts. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[charts] Support of different series values arrays lengths in terms of line chart
4 participants