gladly-plot 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/core/Plot.js +5 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gladly-plot",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "GPU-powered multi-axis plotting library with regl + d3",
5
5
  "type": "module",
6
6
  "exports": {
package/src/core/Plot.js CHANGED
@@ -98,29 +98,18 @@ function buildPlotSchema(data, config) {
98
98
  },
99
99
  axes: {
100
100
  type: "object",
101
- properties: Object.fromEntries(AXES.map(axisId => {
102
- const isXAxis = axisId.startsWith('x')
103
- return [axisId, {
104
- type: "object",
105
- properties: {
106
- quantity_kind: { type: "string" },
107
- min: { type: "number" },
108
- max: { type: "number" },
109
- label: { type: "string" },
110
- scale: { type: "string", enum: ["linear", "log"] },
111
- ...(isXAxis ? { rotate: { type: "boolean" } } : {})
112
- }
113
- }]
114
- })),
101
+ // All axes (spatial, color, filter) are populated by getConfig() after the first render.
102
+ // Using only additionalProperties means no hardcoded axis list appears in the schema;
103
+ // the config editor shows exactly the axes declared by active layers.
115
104
  additionalProperties: {
116
- // Color/filter/quantity-kind axes.
117
- // All fields from the quantity kind registration are valid here and override the registration.
118
105
  type: "object",
119
106
  properties: {
107
+ quantity_kind: { type: "string" },
120
108
  min: { type: "number" },
121
109
  max: { type: "number" },
122
110
  label: { type: "string" },
123
111
  scale: { type: "string", enum: ["linear", "log"] },
112
+ rotate: { type: "boolean" },
124
113
  colorscale: {
125
114
  type: "string",
126
115
  enum: [