Releases: yanqingwang/quadrant-chart
Release list
1.2.5
1.2.5
Axes can carry a note
A cell note says what is in a cell. Nothing on the chart could say what the scale means — where the
numbers came from, whether a higher score is better or worse, whether an axis runs backwards. That is
the context a quadrant chart is least able to do without.
Each axis now takes a note: a line of smaller muted text beside it. The X note sits below its caption,
the Y note runs up the left gutter. Writing one reserves room for it; clearing it gives the room back.
Charts without notes keep exactly the layout they had.
Axes → Note under the X axis… / Note beside the Y axis….
Scriptable
The note lives in the .mdx frontmatter as x.note / y.note, alongside everything else the plugin
owns — so it is searchable, diffable, and writable without opening Obsidian.
chart.set_axis("x", note="1-10 from the line manager, recalibrated each quarter")
chart.set_axis("x", clear_note=True) # and the space it reservedpython3 Script/mdx_chart.py set-axis --path Q1.mdx --axis x \
--label "Impact" --min 0 --max 10 --note "1-10 from the line manager"An absent note is omitted from the file entirely, so removing one leaves no empty key and no diff.
No format change to existing files — a chart that has no axis note parses and writes exactly as
before.
1.2.4
1.2.4
The white ring around labels is gone
A label carries a thin outline in the colour of the surface behind its glyphs — that is what keeps it
readable where it crosses a grid line. The outline was being drawn in the page background colour, but a
label sitting in a coloured cell has that cell's tint behind it, not the page. Every label in a coloured
cell therefore wore a white ring, which reads as a drop shadow rather than as separation.
The outline is now the colour actually behind the text, resolved per line, so it disappears against its
own background and only shows where it is doing its job.
Long labels wrap instead of running off the chart
Free text was drawn as one unsplittable line and never clipped. A long label simply ran off both edges —
a 567-character label came out 3291px wide in a 1400px export, with about two thirds of it outside the
canvas. This affected the canvas, the SVG export and the PNG/JPG export alike.
Labels now wrap. The width limit is a new setting, Maximum label width, at 80% of the plot area by
default. It is a percentage rather than a pixel count so the same rule holds in a narrow pane and in a
full-size export, and changing it redraws the charts you have open.
The clickable area, the label's background plate, its outline box and the selection box all grow with the
wrapped block, so a three-line label behaves like a three-line label rather than only responding on its
first line.
No format change. Cell notes still wrap to the cell width and remain the better home for a paragraph.
1.2.3
1.2.3
Double-click now edits a label instead of creating a new one
The first click of a double-click selects the label, and selecting redraws the canvas from scratch. That redraw destroys and
rebuilds the very <text> node the pointer was sitting on, so by the time the double-click was dispatched the browser had
retargeted it to the <svg>. The handler asked the event which label was hit, was told "none", and fell through to its
"empty area" branch — producing a second label next to the one you meant to edit.
Labels are now resolved by position, using the same hit test a single click uses, so a double-click and a single click can
never disagree about what is under the pointer. Where labels overlap, the one you have selected is edited.
To edit a label: double-click it. To add one: double-click empty space.
Review checklist
The two Errors reported against 1.2.2 came from this plugin's own attempt to silence a lint warning, and are now resolved:
- Obsidian's linter does not allow
prefer-create-elto be disabled. The directives added in 1.2.2 are removed and the
underlying warning stands, with the reason recorded in the source:createElbuilds HTML-namespace nodes, so an SVG
constructed with it does not render, and there is no SVG equivalent. - Also cleared: a redundant type assertion, a missing
voidon a toolbar handler, and an untyped settings load.
No format changes. Right-click still deletes a label in one action, and Ctrl/Cmd+Z brings it back.
1.2.2
1.2.2
Fixes right-click deleting a label
Obsidian registers a capture-phase listener on window that intercepts every real context-menu
event and stops it propagating. The chart's own contextmenu handler therefore never ran — the hit
test still resolved, which is why the cursor changed and the feature looked alive, but nothing was
deleted.
Right-click is now handled on pointerdown instead, which Obsidian does not intercept and which
dragging already relies on.
To delete a label: click it, then press Delete, use Label → Delete label, or right-click
it. All three work; none of them depends on the context-menu event surviving.
Review checklist
Cleared ahead of the community-directory review:
- The
onunloadhandler no longer detaches leaves — Obsidian resets a leaf to its default position on
reload, so a user who moved the pane lost that placement every time. - Command ids and names no longer duplicate the plugin id and name (Obsidian renders both itself).
Renamed: Create a blank chart, Create from a worked example, Export as an image,
Open the active chart. Any custom hotkey pointing at the old ids needs updating. - Unused fields, dead code and redundant assertions removed.
js-yamlreplaced withyaml.
No format changes.
1.2.1
1.2.1
Fixes label deletion not being findable.
What was wrong
Deleting a label worked — the action was correct at every level. What was missing was any sign that
it was available:
- Clicking a label did not update the toolbar's Label button, which is labelled with the
selected label. So after adding a label, opening that menu without first clicking the label gave a
single disabled row and no delete option anywhere on screen. It read as "deleting is broken" rather
than "you skipped a step". - A right-click deleted twice: two writes to the file, and two undos to walk back.
- Deletion had only one route, through the context-menu event.
What changed
- The Label button now shows the label you selected, so it is obvious it has something to act on.
- Right-click deletion fires once: one write, one undo step.
- Delete or Backspace now removes the selected label — no menu, no right-click.
To delete: click the label, then use Label → Delete label, press Delete, or right-click
it.
No format changes.
1.2.0
1.2.0
Redo, plus two export options.
Redo
1.0.0 shipped undo with a note explaining that redo was unavailable. That was honest, but it was still
missing, and it is the kind of missing that reads as a bug: undo one step too far and there is no way
back except redoing the edit by hand.
- Ctrl/Cmd+Shift+Z — redo
- Ctrl+Y — redo, for people whose keyboard expects it
- A new change after an undo discards the redo branch, so redo can only ever replay something you have
not since replaced. - Undo and redo clear together when a different file is opened.
Export as SVG
Export → SVG. Vector output that scales to any size without blurring, and — because it is text —
diffs in git like the .mdx it came from.
Like the JPG/PNG exporters, it is generated from the chart model rather than by saving the on-screen
SVG, and for the same reason: cell text on screen lives in a foreignObject, and Chromium drops
foreignObject content when an SVG is loaded as an image. Every colour is written inline, because an
SVG opened outside Obsidian has no stylesheet to inherit.
Transparent background
Export → PNG or SVG, transparent background. For putting a chart into a slide or a document that
supplies its own background.
Offered per format rather than as a single toggle, because JPEG has no alpha channel — a transparent
JPEG is not a thing that can be produced, and asking for one yields a black rectangle where the
transparency should be.
No format changes. 1.0.0 and 1.1.0 files open in 1.2.0 unchanged.
1.1.0
1.1.0
Two additions, both closing gaps where the format supported something the UI did not.
Label font size
items[].size was in the file format, honoured by the canvas and honoured by the image exporter —
and there was no interface anywhere that could set it. A format field with no writer is a field only
a hand-editor can reach.
Select a label → Label → Text size. Fixed steps of 8 / 11 / 14 / 18 / 24 / 32 / 48 px, plus
Custom… for anything else, plus Default to clear the override and go back to following the
chart's base size.
Fixed steps rather than a slider or a number field, because neither of those shows the result before
you commit to it. The steps are spread far enough apart that you can tell at a glance which one is
checked.
Overlapping labels
A label sitting under another was unreachable. Two labels at the same coordinate are identical in the
file except for which comes first, and a pointer event only ever reports the topmost one — so clicking
the lower one always hit the upper one.
Two ways out, both now available:
- Click the same spot repeatedly to step down through the stack. It wraps round rather than
sticking. - Label → Bring to front / Send to back, for when you would rather not hunt. Both are disabled
when they would change nothing.
Order is stored in the file, so it survives a reload.
Also
- The two new actions are undoable like everything else.
Script/mdx_chart.pygainsset_item_size,bring_to_front,send_to_back, and the matching
set-item-size/reorder-itemCLI commands.
No format changes: 1.0.0 files open in 1.1.0 unchanged.
1.0.0
1.0.0 — first release
Draw labelled N x M quadrant charts in Obsidian. Charts live in .mdx files as plain YAML
frontmatter, so they stay readable, hand-editable, git-diffable, and scriptable.
Features
- Any N x M grid, 1x1 to 8x8, with columns and rows set independently
- Labelled axes with configurable ranges; tick values are derived
- Free-floating labels anywhere on the plot — drag, double-click to edit, right-click to delete
- Cell labels, notes and colours
- Styled labels — a background plate and/or an outline per label
- Click-to-select, for both labels and cells, each with its own indicator
- Undo with Ctrl/Cmd+Z
- Export to JPG or PNG, written beside the
.mdx - Two built-in examples — a SWOT and a talent nine-box — creatable from the command palette
- Works on desktop and mobile
Scriptable
A chart is plain YAML, so anything that can write YAML can create one. A reference Python module and
CLI ships with the workspace, and docs/API.md documents the format for tools and agents:
python3 Script/mdx_chart.py create --path Q1.mdx --title "Q1 Priorities"
python3 Script/mdx_chart.py add-item --path Q1.mdx --text "Rework sync" --x 8.2 --y 9
Install
Community plugins → Browse → search "Quadrant Chart", or download main.js, manifest.json and
styles.css from this release into <vault>/.obsidian/plugins/quadrant-chart/.
Note for plugin authors
Do not use fileManager.processFrontMatter on a .mdx file: it resolves successfully and writes
nothing. Use app.vault.process(file, fn).