Skip to content

Oxql page - #3312

Draft
fakemonster wants to merge 17 commits into
mainfrom
oxql-page
Draft

Oxql page#3312
fakemonster wants to merge 17 commits into
mainfrom
oxql-page

Conversation

@fakemonster

Copy link
Copy Markdown
Contributor

Keeping in draft for a moment, because we may not want to merge this as-is, but this is a basic loop of "send a query, show it". There's the open design question of "do we prefer a builder form", which should be easier to discuss live. I'm also more than open to input on where we want to take the mock service worker for this. As-is it works just fine, but the OxQL results space is much wider than what the MSW is configured to deliver. You basically have to point at real data to see the fully variety of visualizations.

fakemonster and others added 15 commits July 20, 2026 18:29
Getting these in puts us in a spot where we can pretty easily see the
differences between uplot and recharts.
This is just a touch more portable.
Verbose, but fairly straightforward. The only meaningful changes you
should see are the lack of a top grid line (since uplot does tick
calculation, this would often be quite tight with the line below) and
uplot's tick selection logic replacing ours (which is for the greater
good).
Any canvas drawing element is going to need themes this way. I
considered doing something more involved, like computing the style
within the subscription, or actually making a the subscription an effect
hook, but the thing is, you kind of want to only use getComputedStyle
consciously.
If you passed an anonymous function as the yAxisTickFormatter, that
would cause rerender cycles that screwed with hovering, because the
graph was being constantly re-created. You could say the caller is just
responsible for not doing that, but I was feeling generous.
This also makes some design decisions unilaterally, such as a rotating
color palette, and legends/what they look like.
I'm not entirely sure this is what we're going to love. As you drag the
mouse around, the alpha changes are quite noisy. I wonder if we can get
by with just highlighting the active point (instead of _all_ the points
on that X) and stick the color itself in the tooltip?

The other thought I'm having here: in the legend, there's not much to do
other than throw all the legend values in line like that (or come up
with aliases, but then you need some sort of hover). Within a tooltip,
though, this could be actually formatted!
Maybe we'll actually hang on to something like this in the long run, but
for now it's just plain handy.
MSW already supports a few specific queries, and we could expand that
support, but the challenge is less in adding more metrics/targets, and
more in needing increasingly rich parsing of queries to determine what
the query is actually asking for (multiple tables, alignments, joins,
groupings). For now, I think our bases are covered by just guaranteeing
it always returns _something._
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview Aug 12, 2026 12:12am

Request Review

Still not really respecting the actual details of the query, but this is
enough to get some visual coverage.
@david-crespo

Copy link
Copy Markdown
Collaborator

Idea: query= param so you can bookmark a query.

Base automatically changed from migrate-to-uplot to main August 15, 2026 00:23
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.

3 participants