Questions tagged [observable-plot]

8 questions
2
votes
1 answer

How to create one line plot per color series in Observable Plot?

Description: I am playing around with Observable Plot an really like how easy it is to set up simple plots. Now I have a little "more advanced" chart that I want to plot and need help. In my data, I have multiple temp (temperature) readings recorded…
Markus Weninger
  • 11,931
  • 7
  • 64
  • 137
1
vote
2 answers

How to use Observable Plot in Nodejs?

I read that using jsdom is necessary for Observable Plot (derived module from D3js) to work in Nodejs. However, there are very few examples about this and I cannot get to properly adapt the ones I found. Here is the code I was trying to…
Escargot
  • 21
  • 7
1
vote
0 answers

How to create gaps when using group / groupX / groupY in Observable Plot?

On line charts "if some of the x or y channel values are undefined (or null or NaN), gaps will appear between adjacent points". If my dataset contains such undefined values, how can I achieve that these also remain when I use group / groupX /…
Markus Weninger
  • 11,931
  • 7
  • 64
  • 137
1
vote
1 answer

How to use markes on a line graph in Observable Plot?

While working with Observable Plot, I stumbled across the markers section in the API documentation. Yet, I cannot figure out how to make it work. Imagine I have the following mark: Plot.line(data, {x: "timestamp", y: "val", curve: "natural"}) How…
0
votes
1 answer

How to show distinct datasets in stacked bar chart with Observable Plot?

I'm trying to visualise a seemingly simple income vs expenses chart in form of stacked bar chart with Observable Plot. While I can more or less visualise a single dataset, I'm not sure if showing two distinctive datasets together is possible in…
ALx
  • 611
  • 9
  • 24
0
votes
1 answer

Why does → appear when I plot with Observable Plot?

No matter what I plot with Observable Plot, → appears somewhere. Here is my code: import http from 'http'; import * as Plot from "@observablehq/plot"; import {JSDOM} from "jsdom"; const jsdom = new JSDOM(`
Escargot
  • 21
  • 7
0
votes
0 answers

How to sort a grouped bar chart in Observable Plot in Javascript / TypeScript

I have a grouped bar chart made using Observable Plot, and I can't override the auto sort feature in this library. I have 2 possible routes to go, and I'll use whichever can solve the problem. The first is preferred, which looks like this. The…
0
votes
1 answer

Flatten and transform data in Javascript

Given this object (items per array is the same) : { force_x: [6, 7, 7], force_y: [2, 3, 4], timestamp: [0.08, 0.016, 0.024] } How could I use Javascript to create this for all keys except timestamp : { {mode: "force_x", value: 6,…