-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
vgplot Mark TipOptions format - possibly incorrect parsing. #709
Comments
![]() I can repro this with a small plain example import { coordinator, wasmConnector } from '@uwdata/mosaic-core';
import { loadParquet } from '@uwdata/mosaic-sql';
import * as vg from '@uwdata/vgplot';
async function init() {
const wasm = await wasmConnector({ log: false });
coordinator().databaseConnector(wasm);
await vg.coordinator().exec([
loadParquet("aapl", `${window.location}stocks.parquet`, {where: "Symbol = 'AAPL'"})
]);
document.getElementById("plot").replaceChildren(
vg.plot(
vg.lineY(
vg.from("aapl"),
{x: "Date", y: "Close", stroke: "Symbol", tip: {x: true, y: true, stroke: true}}
),
vg.width(680),
vg.height(200)
)
)
}
init(); Doesn't seem to be an issue with plain plot (https://observablehq.com/d/624cb8a94175eea2). ![]() |
vgplot marks rename some fields when creating database queries. The workaround is to provide your desired names using the |
A potential fix for this could be to automatically set the scale labels (if not explicitly defined) when we marshal a Plot spec within vgplot. |
I was able to partially work around this issue by explicitly specifying the mark channel. Looks like that gets passed to Plot transparently.
This spec has the expected behavior, but without the color encoding. 😄 Thank you @jheer for the proper workaround. 🚀 |
I have a mosaic vgplot yaml specification that looks like this:
Expected behavior of the plot tip with format option:
MetricName system.cpu.load_average.1m {color}
Observed behavior of the plot tip with format option:
stroke system.cpu.load_average.1m {color}
Image for reference:

Is this expected or am I providing an incorrect chart specification? Thank you for the great work on this!!
The text was updated successfully, but these errors were encountered: