eth.build icon indicating copy to clipboard operation
eth.build copied to clipboard

Add charts display

Open iamonuwa opened this issue 4 years ago • 27 comments

Added charts display component.

Library used does not support area and column charts, but I added more outside the list.

Polar and Radar charts.

@austintgriffith @Polycarpik

Closes #22

iamonuwa avatar Apr 30 '20 11:04 iamonuwa

@Polycarpik @austintgriffith any update?

Plus any new issues to fix? 😁😎

iamonuwa avatar May 01 '20 20:05 iamonuwa

Hi! I just tried out this PR (currently live on ethbuild.uniswap.ch) and I can't get it to actually draw the charts. What am I missing? 2020-05-05_185404 I tried different array/object variations...

ChristophSiegenthaler avatar May 05 '20 16:05 ChristophSiegenthaler

Hey, I'll take a look at this in the morning. Thanks

iamonuwa avatar May 05 '20 20:05 iamonuwa

@ChristophSiegenthaler @Polycarpik I've fix the issue. Had to add styling to the charts for each of the individual charts and all labels to the generic for each of them as well.

iamonuwa avatar May 06 '20 16:05 iamonuwa

Thanks for the effort! Strange, it still doesn't work for me. I see the added label input but otherwise not much changed: 2020-05-07_105140 Do you see anything I do wrong?

ChristophSiegenthaler avatar May 07 '20 08:05 ChristophSiegenthaler

Try using the code input and convert to any from object and feed into it. I was able to reproduce your error and fixed it. It works. My data was small yet it showed up. /cc @ChristophSiegenthaler

iamonuwa avatar May 07 '20 14:05 iamonuwa

Mine still look weird whatever I try with code/object/any. It sometimes shows input but 10 times the amount of input data that I feed it. Could you please post a sample screenshot of yours so that I can try the same inputs?

ChristophSiegenthaler avatar May 08 '20 07:05 ChristophSiegenthaler

Mine still look weird whatever I try with code/object/any. It sometimes shows input but 10 times the amount of input data that I feed it. Could you please post a sample screenshot of yours so that I can try the same inputs?

Sure, I'll post a screenshot today

iamonuwa avatar May 08 '20 14:05 iamonuwa

Bar Chart Pie Chart

/cc @ChristophSiegenthaler @Polycarpik

iamonuwa avatar May 10 '20 17:05 iamonuwa

Weird, I still get the same, after the last commit: 2020-05-11_161909

ChristophSiegenthaler avatar May 11 '20 14:05 ChristophSiegenthaler

Weird, I still get the same, after the last commit: 2020-05-11_161909

It works perfectly now. Please check your side

iamonuwa avatar May 11 '20 14:05 iamonuwa

@ChristophSiegenthaler https://www.loom.com/share/112f634e4ea9436a99dd8759a17229d5

iamonuwa avatar May 11 '20 15:05 iamonuwa

@iamonuwa Hh, sorry, I used netlify to build it but then I tested with an older deployed version. It kind of works now but I still have some issue with scatter and scaling...

ChristophSiegenthaler avatar May 11 '20 15:05 ChristophSiegenthaler

@iamonuwa Hh, sorry, I used netlify to build it but then I tested with an older deployed version. It kind of works now but I still have some issue with scatter and scaling...

Scatter requires objects parsed in as list not strings.

iamonuwa avatar May 11 '20 15:05 iamonuwa

Hey hey @iamonuwa , I finally got the time to test this, sorry for the delays. First of all, the line chart is missing. Second of all – Radar and polar are simply not readable image image But that concerns most of the charts. Also, when I try to scale the component with chart – chart becomes bigger, but it floats down and does not come back into the component. And with every next resize it goes down and down the screen. image And the small one – block is missing the title.

Thanks for putting so much effort into it! We can agree that that's gonna be the last change request unless something radically horrible shows up.

Polycarpik avatar May 13 '20 01:05 Polycarpik

@Polycarpik thanks for the review. I'll take a look at it again.

iamonuwa avatar May 13 '20 05:05 iamonuwa

@Polycarpik I've fixed the other issues raised. But scatter has not fix presently. I had to remove it. I've tried every possible combination to pass objects and convert to array but it fails.

iamonuwa avatar May 14 '20 01:05 iamonuwa

Cool, thanks! @iamonuwa

So, Polar is good and scalable, Radar still has the very same issues bugs I did not find where is 'second dataset' used. Why have you added it? 'Labels' are used sometimes as labels on charts, sometimes as dataset (for line, for example). Can we rename if to 'first dataset', so after all we have only 3 inputs: 'type', 'first dataset', 'second dataset'. Block is still missing the title: image It should be green (as all display blocks are) and have 'CHARTS' written on it. Example: image Also, no need for the word 'DISPLAY' here, just 'CHARTS' will be cool: image

Polycarpik avatar May 16 '20 21:05 Polycarpik

Hey @Polycarpik the second dataset is for radar charts. It requires 2 datasets to work properly. I'll make the changes needed. Thanks

iamonuwa avatar May 17 '20 03:05 iamonuwa

@iamonuwa let me know when you're done, thank you!

Polycarpik avatar May 19 '20 22:05 Polycarpik

@Polycarpik ready for review.

iamonuwa avatar May 19 '20 22:05 iamonuwa

Okie-doke, i've took a look there. @iamonuwa Out of all outlined issues – (1) radar is still behaves weird when block size changed, see the gif in previous message. Also radar works well with 2 inputs: image It is just super-confusing that sometimes label is used as label and sometimes as actual dataset. This is why I requested to rename it to First Dataset and Second Dataset. And delete the third property (the very bottom one, currently names 'Second Dataset').

Let me know if you have any questions.

Polycarpik avatar May 19 '20 22:05 Polycarpik

@Polycarpik thanks for the review. I left the label for a user to enter the legends/key of the chart. I sent you a dm on discord as well. We can discuss in realtime over there.

iamonuwa avatar May 20 '20 01:05 iamonuwa

@Polycarpik are you there?

iamonuwa avatar May 26 '20 09:05 iamonuwa

Still waiting for updates guys

iamonuwa avatar May 29 '20 13:05 iamonuwa

Alright, I tried the latest iteration, some thoughts:

  • it's not self explanatory. How should the user know what charts are available? He can look in the code, sure, but wouldn't more guidance in the UI help? Same for the second data set (- The bar chart defaults to scale the y axis to max and min value, which leads to the smallest bar always being invisible. IMO defaulting to 0 - max would be better but maybe this is just me)
  • Chart scaling "escalates quickly" ... doesn't work for most chart types (doughnut, radar, pie ..)
  • Scatter not working
  • Why can't one connect the text input box directly to label, only the string box?

It's nice to play around with it and I really appreciate the work you put into it but the issues above make using it very inconsistent and it feels unfinished/buggy.

ChristophSiegenthaler avatar Jun 02 '20 21:06 ChristophSiegenthaler

Thanks, I'll make a fix for these issues.

iamonuwa avatar Jun 02 '20 21:06 iamonuwa