-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Question
I'm using perspective-python (v4.0.1) and trying to create a multi-pane dashboard with charts (Y Line, Y Bar, Y Area) using perspective-workspace.
What works:
- ✅
PerspectiveWidgetin JupyterLab with single charts (Y Bar, Y Line, etc.) - ✅
perspective-workspacewith Datagrid plugin via Python Tornado server + HTML
What doesn't work:
- ❌
perspective-workspacewith chart plugins (Y Line, Y Bar, Y Area) - throws error:
Error: Cannot read properties of null (reading 'opacity')
TypeError: Cannot read properties of null (reading 'opacity')
at colorStyles.ts:63:26
at mc (colorStyles.ts:42:26)
at pc.update (plugin.ts:481:9)
at async pc.draw (plugin.ts:312:9)
My setup:
- Python server (Tornado) serving data via WebSocket
- HTML page loading from CDN (
@finos/perspective-*or@perspective-dev/*) - Both CDN sources produce the same error
Code example:
server.py
import perspective
import perspective.handlers.tornado
server = perspective.Server()
client = server.new_local_client()
table = client.table(data, name="pnl")
app = tornado.web.Application([
(r"/websocket", perspective.handlers.tornado.PerspectiveTornadoHandler,
{"perspective_server": server}),
])index.html
<perspective-workspace id="workspace"></perspective-workspace>
<script type="module">
import perspective from "https://cdn.jsdelivr.net/npm/@finos/perspective/dist/cdn/perspective.js";
// ... other imports
const client = await perspective.websocket("ws://localhost:8083/websocket");
const table = await client.open_table("pnl");
workspace.tables.set("pnl", table);
workspace.restore({
viewers: {
"chart": {
plugin: "Y Line", // Error occurs here
group_by: ["Date"],
columns: ["Value"],
table: "pnl"
}
}
});
</script>Questions:
- Is multi-pane workspace with chart plugins supported when using Python backend?
- Is this a known CSS/theme compatibility issue between Python server and JS frontend?
- Are there plans to provide a native Python widget for multi-pane workspace (like
PerspectiveWorkspaceWidget)?
Environment:
- perspective-python: 4.0.1
- Python: 3.12
- OS: macOS
- Browser: Chrome
Thanks!
Metadata
Metadata
Assignees
Labels
No labels