8000 Feature: New charts library. by MiguelMedeiros · Pull Request #738 · mempool/mempool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature: New charts library. #738

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

Merged
merged 12 commits into from
Sep 15, 2021
Merged

Conversation

MiguelMedeiros
Copy link
Contributor
@MiguelMedeiros MiguelMedeiros commented Aug 21, 2021

Fix #94 and #600 .

Tasks

  • Create new component incoming-transactions-graph;
  • Refactor component mempool-graph;
  • Refactor component fee-distribution-graph;
  • Add incoming-transactions-graph to dashboard;
  • Add incoming-transactions-graph to statistics;
  • Add incoming-transactions-graph to television;
  • Add mempool-graph to dashboard;
  • Add mempool-graph to statistics;
  • Add mempool-graph to television;
  • Remove chartist.component;

Preview

preview-dashboard

@MiguelMedeiros MiguelMedeiros added enhancement New feature or request UI/UX labels Aug 21, 2021
@MiguelMedeiros MiguelMedeiros added this to the v2.3 milestone Aug 21, 2021
@mempool mempool deleted a comment from Dahershiser Aug 21, 2021
@wiz
Copy link
Member
wiz commented Aug 21, 2021

This is really cool. Initial thoughts:

  • You need to display the date in addition to the time when viewing graphs >2h period, for example check https://mempool.ninja/graphs#1y and you will see it only displays the time
  • Same goes for the y-axis labels at the bottom when viewing graphs >2h period, only the time is displayed
  • These 2 cases apply to both charts
  • It would be cool to more clearly communicate what the rate of incoming transactions is somehow, newbies are often confused by this

@wiz
Copy link
Member
wiz commented Aug 21, 2021

Sorry maybe I'm missing something but how do you toggle on/off the colors tiers on the stacked chart?

@wiz
Copy link
Member
wiz commented Aug 21, 2021

Also missing the button to invert the chart colors. And you should invert the order of the overlay legend to have the order of colors so they always match how they are stacked in the graph.

@wiz
Copy link
Member
wiz commented Aug 21, 2021

Might be better without the crosshairs and just focus on polishing the overlay legend

@MiguelMedeiros MiguelMedeiros force-pushed the feature-echarts branch 2 times, most recently from 8eb3da6 to 623fa67 Compare August 25, 2021 04:01
@MiguelMedeiros
Copy link
Contributor Author
MiguelMedeiros commented Aug 25, 2021

TASKS

  • Add total sum to mempool chart.
  • Add zoom tools.
  • Add different theme for charts big and small (default).
  • Fix date format on mouseover:
    • 2h/24h shows date format HH:mm;
    • Default date format MM/dd HH:mm.
  • Fix animations on graphs page.
  • Fix overflow tv page.
  • Remove crosshair on mouseover, changed to line.
  • Fix custom tooltip styles:
    • Add highlight tooltip label color when mouseover that fee range;
    • Style symbol, value, total value an title with proper color and font-size;
    • Add different background-color to pages with big theme chart.
  • Remove inverted button (will add in a future PR).
  • Remove fee range labels (will add in a future PR).
  • Fix e2e testing.

Preview

preview-echarts-1 gif

@MiguelMedeiros MiguelMedeiros marked this pull request as ready for review August 25, 2021 04:12
@murchandamus
Copy link

Hi Miguel, I am a heavy user of mempool charts and I'm really excited for the chart makeover! 🤓
wiz invited me to comment on this PR.

Especially, I frequently post screenshots of mempool charts to comment on the current mempool state. Given that the chart is almost exclusively interesting in the context of the time it was recorded at, I'd prefer if even the 2h/24h chart had the date.

I noticed that the order of the layers in the chart (high feerate at the top) is reverse of the order of the legend (low feerate at the top). It would feel more natural to me if they were both in the same order, i.e. if the legend were also to have the lowest feerate at the bottom.

I often want to know both the transaction weight in a specific band and the total transaction weight at and above this feerate. The former is for example useful to observe which bands are growing or where big batches of consolidation transactions get added to the mempool. The latter is more useful to determine how long it takes until transactions at specific feerates may be included in blocks. I surmise that a 3-column legend would be rather wide, but would it be possible to have both the specific band's volume and the sum of all transactions down to that feerate per band? If that were deemed too aesthetically unpleasing, would it perhaps be possible to show the two values for the band that the cursor is hovering over in an area of the chart that doesn't show data?

To minimize the size of the legend, perhaps the rows for which there are no transactions with that feerate or higher could be not rendered. I.e. if the highest band with transactions were 30-40, 40-50 would show zero/zero and the ones above would not show up in the legend.

image
I noticed that especially when tracking significant parts of the chart like the instant a block was found, it can be hard to determine where that significant point exactly lies in the chart because of the buttons obscuring the curve in the chart. Perhaps these buttons could be a little less opaque?

@MiguelMedeiros
Copy link
Contributor Author
MiguelMedeiros commented Aug 27, 2021

Hey @xekyo nice to meet you! ❤️
Thanks for the awesome feedback! 👍

I've added all of your requests to my task list!
PS: @wiz @softsimon @knorrium I also did your requests!

Tasks

  • Invert the tooltip legend order.
  • Fix default date to title tooltip MM/dd HH:mm.
  • Add symbol to tx chart tooltip .
  • Add cumulative total to tooltip information.
  • Add 3rd column to tooltip with a progress bar.
  • Add min and max span zoom span.
  • Add feeRate limit input to mempool graph component.
  • Add showZoom option to mempool graph component.
  • Remove start animation to match the layout for future SSR.
  • Remove mouse wheel zoom from small template.
  • Fix small template style.

Preview

preview-echarts-2

@murchandamus
Copy link

Oh, I love the progress bar at the bottom. Just to clarify, the total and 100% of that bar refer to the sum of all transactions at that point in time in the chart, right?

When you demonstrated the pass from top to bottom on the chart, I noticed that the number above the total was diminishing. Contrary to the intuition, I think that this number should be the sum from the top feerate rather: miners include transactions with the highest feerate first. So, if you want to figure out how many transactions are going to have priority over yours, you would want to know the sum of transactions with a higher feerate. On the other hand, I don't think the sum of transactions from the lowest feerate to this feerate is interesting. At most, I'd perhaps investigate the size of the lowest band to determine whether transactions were displaced from the mempool when the mempool has reached its limit, but even then, I'd only need the size of the lowest band but not the sum from the lowest feerate.

The % in the third column is beautiful, but it seems to be replicating the information already shown in the chart itself and the second column. I find it hard to discern all the small percentages shown there right now. Perhaps using it to show the percentage of the total transaction weight from the highest feerate to this band would be more informative.

Thanks for your quick response!

@wiz
Copy link
Member
wiz commented Aug 27, 2021

@xekyo you can demo the latest changes on mempool.ninja

@murchandamus
Copy link

Ah sweet. I was thinking about asking how I could build it locally, but it seemed like something that would take a lot of time. I'll play with that then!

@murchandamus
Copy link

First question, is the mempool data on mempool.ninja supposed to reflect mainnet?
Because if so, something strange is going on, the staging environment is reporting 20 MvB, while the main page is showing 6.5 MvB.
image
image

@wiz
Copy link
Member
wiz commented Aug 28, 2021

the staging environment is reporting 20 MvB, while the main page is showing 6.5 MvB.

it's a bug which miguel is already working on 😅

@MiguelMedeiros MiguelMedeiros force-pushed the feature-echarts branch 2 times, most recently from 0817429 to 2524284 Compare September 7, 2021 20:54
@wiz
Copy link
Member
wiz commented Sep 7, 2021

@xekyo mempool.ninja has been updated with latest fixes

@wiz
Copy link
Member
wiz commented Sep 7, 2021
  • On the main dashboard, we are missing the y-axis on the incoming transactions chart
  • The x-axis labels would probably look better being 2 lines, with a line break between the date and time
  • Looks like the labels on the y-axis are getting truncated

Screen Shot 2021-09-08 at 7 51 49

@wiz
Copy link
Member
wiz commented Sep 7, 2021

And lastly, need a y-axis slider to hide fee rate tiers, as currently works on the old chart library

@wiz
Copy link
Member
wiz commented Sep 8, 2021

Oh, and some users want to invert the order of the fee rate tiers, we have this feature on the current site

@murchandamus
Copy link
murchandamus commented Sep 8, 2021

image

  1. Occasionally, there is a line break introduced in the headline of the legend, I think this is probably unintended.
  2. The third column in the legend gives the percentages that each band has relative to the total. Thinking more about it, I'd prefer it were the sum of the virtual size of this band and all bands paying a higher feerate. (As on jochen-hoenicke.de/queue):
Current: % Suggested: Sum of vsize Comment
0.0 % 0
0.2 % 0.02 MvB
1.0 % 0.12 MvB 0.1 MvB + 0.02 from band with higher feerates
0.2 % 0.14 MvB 0.02 MvB + 0.12 MvB from higher feerates
1.0 % 0.24 MvB 0.1 MvB + 0.14 MvB from higher feerates
... ... ...
  1. The disks that are drawn at the intersection of the cursor line and the graph occlude the graph to a degree where the graph itself cannot be seen. Perhaps it would be better to only show a small dot at the intersections or otherwise make them transparent?

  2. I like the bottom giving the details of the current band as is!

@murchandamus
Copy link

Just a quick follow-up to substantiate the motivation for my proposal for the third column: one of the main insights users wish to glean from a mempool chart is "How much transaction data has a higher priority than mine?". The easiest way to make that available is by summing all transactions' vsizes above a given feerate as I propose for the third column.

@wiz
Copy link
Member
wiz commented Sep 12, 2021

@xekyo updated mempool.ninja with a WIP commit just now

Refactor component mempool-graph;
Refactor component fee-distribution-graph;
Add incoming-transactions-graph to dashboard;
Add incoming-transactions-graph to statistics;
Add incoming-transactions-graph to television;
Add mempool-graph to dashboard;
Add mempool-graph to statistics;
Add mempool-graph to television;
Remove chartist.component;
Add zoom tools.
Add different theme for charts `big` and `small` (default).
Fix date format on mouseover.
Fix animations on graphs page.
Fix overflow tv page.
Remove `crosshair` on mouseover, changed to `line`.
Fix custom tooltip styles.
Remove inverted button (will add in a future PR).
Remove fee range labels (will add in a future PR).
Fix e2e testing.
Add symbol to tx chart tooltip .
Fix default data to title tooltip MM/dd HH:mm.
Add symbol to tx chart tooltip .
Add accumulative total for tooltip information.
Add 3th column to tooltip with a progress bar.
Add and max span zoom span.
Add feeRate limit input to mempool graph component.
Add showZoom option to mempool graph component.
Remove start animation to match the layout for future SSR.
Remove mouse wheel zoom from small template.
Fix small template style.
Fix data structure of mempool graph.
Change tooltip total position (top).
Change tooltip visual of partial porcentage.
Fix yAxis value.
Fix yAxis value.
Make disks smaller and transparent.
Change opacity on mouseover stack bars.
Add 4th column "sum of vsize" to tooltips table.
Add toggle show/hide tier fees.
Make progress active bar inline with text value.
Add a break line to the timestamp text.
Add colored progress bar with number.
Fix no shadowed variable tslint warning.
Fix tv page css.
@wiz wiz merged commit 47ae306 into mempool:master Sep 15, 2021
@MiguelMedeiros MiguelMedeiros deleted the feature-echarts branch September 16, 2021 23:26
@wiz wiz linked an issue Oct 1, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add detailed overlay for mempool graph. Charts: Investigate and replace the current chartist library
3 participants
0