@rowsncolumns/charts 28.1.0 → 28.1.2
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.
- package/dist/cjs/components/editors/chart-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/chart-editor.js +45 -45
- package/dist/cjs/utils/chart-styles.d.ts +5 -1
- package/dist/cjs/utils/chart-styles.d.ts.map +1 -1
- package/dist/cjs/utils/chart-styles.js +1 -1
- package/dist/esm/components/editors/chart-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/chart-editor.js +2 -2
- package/dist/esm/utils/chart-styles.d.ts +5 -1
- package/dist/esm/utils/chart-styles.d.ts.map +1 -1
- package/dist/esm/utils/chart-styles.js +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-editor.d.ts","sourceRoot":"","sources":["../../../../components/editors/chart-editor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,2BAA2B,CAAC;AAuBnC,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AA4CvC,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC;;;;OAIG;IACH,kBAAkB,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAuBF,eAAO,MAAM,WAAW,GAAI,sEAMzB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"chart-editor.d.ts","sourceRoot":"","sources":["../../../../components/editors/chart-editor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,2BAA2B,CAAC;AAuBnC,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AA4CvC,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC;;;;OAIG;IACH,kBAAkB,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAuBF,eAAO,MAAM,WAAW,GAAI,sEAMzB,gBAAgB,sBAo6DlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -48,7 +48,7 @@ var Section = function (_a) {
|
|
|
48
48
|
react_1.default.createElement("div", { className: "flex flex-col gap-2 pb-3" }, children)));
|
|
49
49
|
};
|
|
50
50
|
var ChartEditor = function (_a) {
|
|
51
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39;
|
|
51
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40;
|
|
52
52
|
var chart = _a.chart, sheetId = _a.sheetId, onSubmit = _a.onSubmit, onRequestMoveChart = _a.onRequestMoveChart, getFormattedValue = _a.getFormattedValue;
|
|
53
53
|
var setChartDialogState = (0, editing_chart_atom_1.useSetChartEditorDialogState)();
|
|
54
54
|
// Close dialog
|
|
@@ -68,7 +68,7 @@ var ChartEditor = function (_a) {
|
|
|
68
68
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
69
|
[chart === null || chart === void 0 ? void 0 : chart.chartId]);
|
|
70
70
|
// Formik
|
|
71
|
-
var
|
|
71
|
+
var _41 = (0, formik_1.useFormik)({
|
|
72
72
|
initialValues: initialValues,
|
|
73
73
|
enableReinitialize: true,
|
|
74
74
|
onSubmit: function (values) {
|
|
@@ -80,7 +80,7 @@ var ChartEditor = function (_a) {
|
|
|
80
80
|
// Close dialog
|
|
81
81
|
closeDialog();
|
|
82
82
|
},
|
|
83
|
-
}), handleSubmit =
|
|
83
|
+
}), handleSubmit = _41.handleSubmit, setFieldValue = _41.setFieldValue, resetForm = _41.resetForm, values = _41.values;
|
|
84
84
|
var onCancelForm = function () {
|
|
85
85
|
resetForm();
|
|
86
86
|
closeDialog();
|
|
@@ -506,13 +506,13 @@ var ChartEditor = function (_a) {
|
|
|
506
506
|
}))),
|
|
507
507
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
508
508
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Quick layout"),
|
|
509
|
-
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: "", "aria-label": "Quick layout", onChange: function (e) {
|
|
509
|
+
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: (_o = values.spec.quickLayout) !== null && _o !== void 0 ? _o : "", "aria-label": "Quick layout", onChange: function (e) {
|
|
510
510
|
var layout = chart_styles_1.CHART_QUICK_LAYOUTS.find(function (entry) { return String(entry.id) === e.target.value; });
|
|
511
511
|
if (layout) {
|
|
512
512
|
setFieldValue("spec", (0, chart_styles_1.applyChartQuickLayout)(values.spec, layout));
|
|
513
513
|
}
|
|
514
514
|
} },
|
|
515
|
-
react_1.default.createElement("option", { value: "" }, "Choose a layout\u2026"),
|
|
515
|
+
react_1.default.createElement("option", { value: "", disabled: true }, "Choose a layout\u2026"),
|
|
516
516
|
chart_styles_1.CHART_QUICK_LAYOUTS.map(function (layout) { return (react_1.default.createElement("option", { key: layout.id, value: layout.id }, layout.label)); }))),
|
|
517
517
|
react_1.default.createElement("div", null,
|
|
518
518
|
react_1.default.createElement(ui_1.Button, { type: "button", size: "xs", onClick: function () {
|
|
@@ -521,22 +521,22 @@ var ChartEditor = function (_a) {
|
|
|
521
521
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
522
522
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Title font"),
|
|
523
523
|
react_1.default.createElement("div", { className: "flex items-center gap-1 flex-wrap" },
|
|
524
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
524
|
+
react_1.default.createElement(ui_1.Input, { value: (_q = (_p = values.spec.titleTextFormat) === null || _p === void 0 ? void 0 : _p.fontFamily) !== null && _q !== void 0 ? _q : "", type: "text", onChange: function (e) {
|
|
525
525
|
return setFieldValue("spec.titleTextFormat.fontFamily", e.target.value || undefined);
|
|
526
526
|
}, className: "text-xs w-32", placeholder: "Font family", "aria-label": "Title font family" }),
|
|
527
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
527
|
+
react_1.default.createElement(ui_1.Input, { value: (_s = (_r = values.spec.titleTextFormat) === null || _r === void 0 ? void 0 : _r.fontSize) !== null && _s !== void 0 ? _s : "", type: "number", min: 1, onChange: function (e) {
|
|
528
528
|
return setFieldValue("spec.titleTextFormat.fontSize", e.target.value === "" ? undefined : Number(e.target.value));
|
|
529
529
|
}, className: "text-xs w-16", placeholder: "Size", "aria-label": "Title font size" }),
|
|
530
|
-
react_1.default.createElement("input", { type: "color", value: (
|
|
530
|
+
react_1.default.createElement("input", { type: "color", value: (_u = (_t = values.spec.titleTextFormat) === null || _t === void 0 ? void 0 : _t.color) !== null && _u !== void 0 ? _u : "#000000", onChange: function (e) {
|
|
531
531
|
return setFieldValue("spec.titleTextFormat.color", e.target.value);
|
|
532
532
|
}, className: "h-6 w-8 p-0 border border-rnc-border rounded-sm bg-transparent cursor-pointer", "aria-label": "Title color" }),
|
|
533
533
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
534
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
534
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_v = values.spec.titleTextFormat) === null || _v === void 0 ? void 0 : _v.bold), onChange: function (e) {
|
|
535
535
|
return setFieldValue("spec.titleTextFormat.bold", e.target.checked);
|
|
536
536
|
} }),
|
|
537
537
|
"Bold"),
|
|
538
538
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
539
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
539
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_w = values.spec.titleTextFormat) === null || _w === void 0 ? void 0 : _w.italic), onChange: function (e) {
|
|
540
540
|
return setFieldValue("spec.titleTextFormat.italic", e.target.checked);
|
|
541
541
|
} }),
|
|
542
542
|
"Italic")))),
|
|
@@ -544,7 +544,7 @@ var ChartEditor = function (_a) {
|
|
|
544
544
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
545
545
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Fill"),
|
|
546
546
|
react_1.default.createElement("div", { className: "flex items-center gap-1" },
|
|
547
|
-
react_1.default.createElement("input", { type: "color", value: (
|
|
547
|
+
react_1.default.createElement("input", { type: "color", value: (_x = values.spec.backgroundColor) !== null && _x !== void 0 ? _x : "#FFFFFF", onChange: function (e) {
|
|
548
548
|
return setFieldValue("spec.backgroundColor", e.target.value);
|
|
549
549
|
}, className: "h-6 w-8 p-0 border border-rnc-border rounded-sm bg-transparent cursor-pointer", "aria-label": "Chart area fill" }),
|
|
550
550
|
values.spec.backgroundColor ? (react_1.default.createElement(ui_1.IconButton, { type: "button", onClick: function () {
|
|
@@ -554,7 +554,7 @@ var ChartEditor = function (_a) {
|
|
|
554
554
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
555
555
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Border"),
|
|
556
556
|
react_1.default.createElement("div", { className: "flex items-center gap-1" },
|
|
557
|
-
react_1.default.createElement("input", { type: "color", value: (
|
|
557
|
+
react_1.default.createElement("input", { type: "color", value: (_y = values.borderColor) !== null && _y !== void 0 ? _y : "#D9D9D9", onChange: function (e) { return setFieldValue("borderColor", e.target.value); }, className: "h-6 w-8 p-0 border border-rnc-border rounded-sm bg-transparent cursor-pointer", "aria-label": "Chart area border" }),
|
|
558
558
|
values.borderColor ? (react_1.default.createElement(ui_1.IconButton, { type: "button", onClick: function () { return setFieldValue("borderColor", undefined); }, "aria-label": "No border", title: "No border" },
|
|
559
559
|
react_1.default.createElement(icons_1.CrossCircledIcon, null))) : (react_1.default.createElement("span", { className: "font-system text-xs text-rnc-text-weak" }, "None")))),
|
|
560
560
|
react_1.default.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
@@ -566,7 +566,7 @@ var ChartEditor = function (_a) {
|
|
|
566
566
|
react_1.default.createElement(Section, { title: "Legend" },
|
|
567
567
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
568
568
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Legend"),
|
|
569
|
-
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: (
|
|
569
|
+
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: (_0 = (_z = values === null || values === void 0 ? void 0 : values.spec.legend) === null || _z === void 0 ? void 0 : _z.position) !== null && _0 !== void 0 ? _0 : "", onChange: function (e) {
|
|
570
570
|
return setFieldValue("spec.legend.position", e.target.value || undefined);
|
|
571
571
|
} },
|
|
572
572
|
react_1.default.createElement("option", { value: "" }, "Auto"),
|
|
@@ -578,7 +578,7 @@ var ChartEditor = function (_a) {
|
|
|
578
578
|
react_1.default.createElement(Section, { title: "Vertical axis" },
|
|
579
579
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
580
580
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Vertical axis title"),
|
|
581
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
581
|
+
react_1.default.createElement(ui_1.Input, { value: (_1 = values === null || values === void 0 ? void 0 : values.spec.verticalAxisTitle) !== null && _1 !== void 0 ? _1 : "", type: "text", onChange: function (e) {
|
|
582
582
|
return setFieldValue("spec.verticalAxisTitle", e.target.value);
|
|
583
583
|
}, className: "text-xs", placeholder: "Vertical axis title" })),
|
|
584
584
|
isCartesianBasic ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-2 pb-2" },
|
|
@@ -586,36 +586,36 @@ var ChartEditor = function (_a) {
|
|
|
586
586
|
react_1.default.createElement("div", { className: "flex flex-wrap gap-2 items-end" },
|
|
587
587
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 w-20" },
|
|
588
588
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Min"),
|
|
589
|
-
react_1.default.createElement(ui_1.Input, { type: "number", value: (
|
|
589
|
+
react_1.default.createElement(ui_1.Input, { type: "number", value: (_3 = (_2 = values === null || values === void 0 ? void 0 : values.spec.valueAxisOptions) === null || _2 === void 0 ? void 0 : _2.min) !== null && _3 !== void 0 ? _3 : "", onChange: function (e) {
|
|
590
590
|
return setFieldValue("spec.valueAxisOptions.min", e.target.value === ""
|
|
591
591
|
? undefined
|
|
592
592
|
: Number(e.target.value));
|
|
593
593
|
}, className: "text-xs", placeholder: "Auto" })),
|
|
594
594
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 w-20" },
|
|
595
595
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Max"),
|
|
596
|
-
react_1.default.createElement(ui_1.Input, { type: "number", value: (
|
|
596
|
+
react_1.default.createElement(ui_1.Input, { type: "number", value: (_5 = (_4 = values === null || values === void 0 ? void 0 : values.spec.valueAxisOptions) === null || _4 === void 0 ? void 0 : _4.max) !== null && _5 !== void 0 ? _5 : "", onChange: function (e) {
|
|
597
597
|
return setFieldValue("spec.valueAxisOptions.max", e.target.value === ""
|
|
598
598
|
? undefined
|
|
599
599
|
: Number(e.target.value));
|
|
600
600
|
}, className: "text-xs", placeholder: "Auto" }))),
|
|
601
601
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
602
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
602
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_6 = values === null || values === void 0 ? void 0 : values.spec.valueAxisOptions) === null || _6 === void 0 ? void 0 : _6.logarithmic), onChange: function (e) {
|
|
603
603
|
return setFieldValue("spec.valueAxisOptions.logarithmic", e.target.checked || undefined);
|
|
604
604
|
} }),
|
|
605
605
|
"Logarithmic scale"),
|
|
606
606
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
607
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
607
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_7 = values === null || values === void 0 ? void 0 : values.spec.valueAxisOptions) === null || _7 === void 0 ? void 0 : _7.reverse), onChange: function (e) {
|
|
608
608
|
return setFieldValue("spec.valueAxisOptions.reverse", e.target.checked || undefined);
|
|
609
609
|
} }),
|
|
610
610
|
"Reverse direction"),
|
|
611
611
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
612
|
-
react_1.default.createElement("input", { type: "checkbox", checked: ((
|
|
612
|
+
react_1.default.createElement("input", { type: "checkbox", checked: ((_8 = values === null || values === void 0 ? void 0 : values.spec.valueAxisOptions) === null || _8 === void 0 ? void 0 : _8.showMajorGridlines) !==
|
|
613
613
|
false, onChange: function (e) {
|
|
614
614
|
return setFieldValue("spec.valueAxisOptions.showMajorGridlines", e.target.checked);
|
|
615
615
|
} }),
|
|
616
616
|
"Gridlines"),
|
|
617
617
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Number format"),
|
|
618
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
618
|
+
react_1.default.createElement(ui_1.Input, { value: (_10 = (_9 = values === null || values === void 0 ? void 0 : values.spec.valueAxisOptions) === null || _9 === void 0 ? void 0 : _9.numberFormatPattern) !== null && _10 !== void 0 ? _10 : "", type: "text", onChange: function (e) {
|
|
619
619
|
return setFieldValue("spec.valueAxisOptions.numberFormatPattern", e.target.value || undefined);
|
|
620
620
|
}, className: "text-xs w-32", placeholder: "Linked to source" }),
|
|
621
621
|
basicSpec.series.some(function (s) { return s.useSecondaryAxis; }) ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -623,75 +623,75 @@ var ChartEditor = function (_a) {
|
|
|
623
623
|
react_1.default.createElement("div", { className: "flex flex-wrap gap-2 items-end" },
|
|
624
624
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 w-20" },
|
|
625
625
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Min"),
|
|
626
|
-
react_1.default.createElement(ui_1.Input, { type: "number", value: (
|
|
626
|
+
react_1.default.createElement(ui_1.Input, { type: "number", value: (_12 = (_11 = values === null || values === void 0 ? void 0 : values.spec.secondaryValueAxisOptions) === null || _11 === void 0 ? void 0 : _11.min) !== null && _12 !== void 0 ? _12 : "", onChange: function (e) {
|
|
627
627
|
return setFieldValue("spec.secondaryValueAxisOptions.min", e.target.value === ""
|
|
628
628
|
? undefined
|
|
629
629
|
: Number(e.target.value));
|
|
630
630
|
}, className: "text-xs", placeholder: "Auto" })),
|
|
631
631
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 w-20" },
|
|
632
632
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Max"),
|
|
633
|
-
react_1.default.createElement(ui_1.Input, { type: "number", value: (
|
|
633
|
+
react_1.default.createElement(ui_1.Input, { type: "number", value: (_14 = (_13 = values === null || values === void 0 ? void 0 : values.spec.secondaryValueAxisOptions) === null || _13 === void 0 ? void 0 : _13.max) !== null && _14 !== void 0 ? _14 : "", onChange: function (e) {
|
|
634
634
|
return setFieldValue("spec.secondaryValueAxisOptions.max", e.target.value === ""
|
|
635
635
|
? undefined
|
|
636
636
|
: Number(e.target.value));
|
|
637
637
|
}, className: "text-xs", placeholder: "Auto" }))),
|
|
638
638
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
639
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
639
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_15 = values === null || values === void 0 ? void 0 : values.spec.secondaryValueAxisOptions) === null || _15 === void 0 ? void 0 : _15.logarithmic), onChange: function (e) {
|
|
640
640
|
return setFieldValue("spec.secondaryValueAxisOptions.logarithmic", e.target.checked || undefined);
|
|
641
641
|
} }),
|
|
642
642
|
"Logarithmic scale"),
|
|
643
643
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
644
|
-
react_1.default.createElement("input", { type: "checkbox", checked: ((
|
|
644
|
+
react_1.default.createElement("input", { type: "checkbox", checked: ((_16 = values === null || values === void 0 ? void 0 : values.spec.secondaryValueAxisOptions) === null || _16 === void 0 ? void 0 : _16.showMajorGridlines) !== false, onChange: function (e) {
|
|
645
645
|
return setFieldValue("spec.secondaryValueAxisOptions.showMajorGridlines", e.target.checked);
|
|
646
646
|
} }),
|
|
647
647
|
"Gridlines"),
|
|
648
648
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Number format"),
|
|
649
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
649
|
+
react_1.default.createElement(ui_1.Input, { value: (_18 = (_17 = values === null || values === void 0 ? void 0 : values.spec.secondaryValueAxisOptions) === null || _17 === void 0 ? void 0 : _17.numberFormatPattern) !== null && _18 !== void 0 ? _18 : "", type: "text", onChange: function (e) {
|
|
650
650
|
return setFieldValue("spec.secondaryValueAxisOptions.numberFormatPattern", e.target.value || undefined);
|
|
651
651
|
}, className: "text-xs w-32", placeholder: "Linked to source" }))) : null)) : null),
|
|
652
652
|
react_1.default.createElement(Section, { title: "Horizontal axis" },
|
|
653
653
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
654
654
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Horizontal axis title"),
|
|
655
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
655
|
+
react_1.default.createElement(ui_1.Input, { value: (_19 = values === null || values === void 0 ? void 0 : values.spec.horizontalAxisTitle) !== null && _19 !== void 0 ? _19 : "", type: "text", onChange: function (e) {
|
|
656
656
|
return setFieldValue("spec.horizontalAxisTitle", e.target.value);
|
|
657
657
|
}, className: "text-xs", placeholder: "Horizontal axis title" })),
|
|
658
658
|
isCartesianBasic ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
659
659
|
react_1.default.createElement("label", { className: "font-system text-sm pt-1" }, "Category axis"),
|
|
660
660
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
661
|
-
react_1.default.createElement("input", { type: "checkbox", checked: ((
|
|
661
|
+
react_1.default.createElement("input", { type: "checkbox", checked: ((_20 = values === null || values === void 0 ? void 0 : values.spec.categoryAxisOptions) === null || _20 === void 0 ? void 0 : _20.showMajorGridlines) === true, onChange: function (e) {
|
|
662
662
|
return setFieldValue("spec.categoryAxisOptions.showMajorGridlines", e.target.checked);
|
|
663
663
|
} }),
|
|
664
664
|
"Gridlines"))) : null),
|
|
665
665
|
react_1.default.createElement(Section, { title: "Data labels" },
|
|
666
666
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
667
667
|
react_1.default.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
668
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
668
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_21 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _21 === void 0 ? void 0 : _21.show), onChange: function (e) {
|
|
669
669
|
return setFieldValue("spec.dataLabels.show", e.target.checked);
|
|
670
670
|
} }),
|
|
671
671
|
"Show data labels"),
|
|
672
|
-
((
|
|
672
|
+
((_22 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _22 === void 0 ? void 0 : _22.show) ? (react_1.default.createElement("div", { className: "pl-4 flex flex-col gap-1" },
|
|
673
673
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
674
|
-
react_1.default.createElement("input", { type: "checkbox", checked: ((
|
|
674
|
+
react_1.default.createElement("input", { type: "checkbox", checked: ((_23 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _23 === void 0 ? void 0 : _23.showValue) !== false, onChange: function (e) {
|
|
675
675
|
return setFieldValue("spec.dataLabels.showValue", e.target.checked);
|
|
676
676
|
} }),
|
|
677
677
|
"Value"),
|
|
678
678
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
679
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
679
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_24 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _24 === void 0 ? void 0 : _24.showCategoryName), onChange: function (e) {
|
|
680
680
|
return setFieldValue("spec.dataLabels.showCategoryName", e.target.checked);
|
|
681
681
|
} }),
|
|
682
682
|
"Category name"),
|
|
683
683
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
684
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
684
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_25 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _25 === void 0 ? void 0 : _25.showSeriesName), onChange: function (e) {
|
|
685
685
|
return setFieldValue("spec.dataLabels.showSeriesName", e.target.checked);
|
|
686
686
|
} }),
|
|
687
687
|
"Series name"),
|
|
688
688
|
react_1.default.createElement("label", { className: "font-system text-xs flex items-center gap-1" },
|
|
689
|
-
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((
|
|
689
|
+
react_1.default.createElement("input", { type: "checkbox", checked: Boolean((_26 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _26 === void 0 ? void 0 : _26.showPercent), onChange: function (e) {
|
|
690
690
|
return setFieldValue("spec.dataLabels.showPercent", e.target.checked);
|
|
691
691
|
} }),
|
|
692
692
|
"Percentage"),
|
|
693
693
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Label position"),
|
|
694
|
-
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: (
|
|
694
|
+
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: (_28 = (_27 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _27 === void 0 ? void 0 : _27.position) !== null && _28 !== void 0 ? _28 : "outside", onChange: function (e) {
|
|
695
695
|
return setFieldValue("spec.dataLabels.position", e.target.value);
|
|
696
696
|
} },
|
|
697
697
|
react_1.default.createElement("option", { value: "center" }, "Center"),
|
|
@@ -701,19 +701,19 @@ var ChartEditor = function (_a) {
|
|
|
701
701
|
react_1.default.createElement("option", { value: "outsideEnd" }, "Outside end"),
|
|
702
702
|
react_1.default.createElement("option", { value: "bestFit" }, "Best fit")),
|
|
703
703
|
react_1.default.createElement("label", { className: "font-system text-xs" }, "Number format pattern"),
|
|
704
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
704
|
+
react_1.default.createElement(ui_1.Input, { value: (_30 = (_29 = values === null || values === void 0 ? void 0 : values.spec.dataLabels) === null || _29 === void 0 ? void 0 : _29.numberFormatPattern) !== null && _30 !== void 0 ? _30 : "", type: "text", onChange: function (e) {
|
|
705
705
|
return setFieldValue("spec.dataLabels.numberFormatPattern", e.target.value || undefined);
|
|
706
706
|
}, className: "text-xs w-32", placeholder: "#,##0.00" }))) : null)),
|
|
707
707
|
basicSpec && showChartOptions ? (react_1.default.createElement(Section, { title: "Chart options" },
|
|
708
708
|
chartOptionControls.binCount ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
709
709
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Bins (leave blank for auto)"),
|
|
710
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
710
|
+
react_1.default.createElement(ui_1.Input, { value: (_31 = basicSpec.binCount) !== null && _31 !== void 0 ? _31 : "", type: "number", min: 1, onChange: function (e) {
|
|
711
711
|
var raw = e.target.value;
|
|
712
712
|
setFieldValue("spec.binCount", raw === "" ? undefined : Number(raw));
|
|
713
713
|
}, className: "text-xs", placeholder: "Auto (Sturges)" }))) : null,
|
|
714
714
|
chartOptionControls.radarStyle ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
715
715
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Radar style"),
|
|
716
|
-
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent", value: (
|
|
716
|
+
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent", value: (_32 = basicSpec.radarStyle) !== null && _32 !== void 0 ? _32 : "standard", onChange: function (e) {
|
|
717
717
|
return setFieldValue("spec.radarStyle", e.target.value);
|
|
718
718
|
} },
|
|
719
719
|
react_1.default.createElement("option", { value: "standard" }, "Standard"),
|
|
@@ -721,7 +721,7 @@ var ChartEditor = function (_a) {
|
|
|
721
721
|
react_1.default.createElement("option", { value: "filled" }, "Filled")))) : null,
|
|
722
722
|
chartOptionControls.stockVariant ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
723
723
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Stock variant"),
|
|
724
|
-
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent", value: (
|
|
724
|
+
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent", value: (_33 = basicSpec.stockVariant) !== null && _33 !== void 0 ? _33 : "HLC", onChange: function (e) {
|
|
725
725
|
return setFieldValue("spec.stockVariant", e.target.value);
|
|
726
726
|
} },
|
|
727
727
|
react_1.default.createElement("option", { value: "HLC" }, "High-Low-Close"),
|
|
@@ -730,28 +730,28 @@ var ChartEditor = function (_a) {
|
|
|
730
730
|
react_1.default.createElement("option", { value: "VOHLC" }, "Volume-Open-High-Low-Close")))) : null,
|
|
731
731
|
chartOptionControls.doughnutHoleSize ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
732
732
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Doughnut hole size (0-0.9)"),
|
|
733
|
-
react_1.default.createElement(ui_1.Input, { type: "number", min: 0, max: 0.9, step: 0.05, value: (
|
|
733
|
+
react_1.default.createElement(ui_1.Input, { type: "number", min: 0, max: 0.9, step: 0.05, value: (_34 = basicSpec.doughnutHoleSize) !== null && _34 !== void 0 ? _34 : "", onChange: function (e) {
|
|
734
734
|
return setFieldValue("spec.doughnutHoleSize", e.target.value === ""
|
|
735
735
|
? undefined
|
|
736
736
|
: Number(e.target.value));
|
|
737
737
|
}, className: "text-xs w-32", placeholder: "0.5" }))) : null,
|
|
738
738
|
chartOptionControls.explosion ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
739
739
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Explosion (% of radius, 0-400)"),
|
|
740
|
-
react_1.default.createElement(ui_1.Input, { type: "number", min: 0, max: 400, step: 5, "aria-label": "Explosion", value: (
|
|
740
|
+
react_1.default.createElement(ui_1.Input, { type: "number", min: 0, max: 400, step: 5, "aria-label": "Explosion", value: (_35 = basicSpec.explosion) !== null && _35 !== void 0 ? _35 : "", onChange: function (e) {
|
|
741
741
|
return setFieldValue("spec.explosion", e.target.value === ""
|
|
742
742
|
? undefined
|
|
743
743
|
: Number(e.target.value));
|
|
744
744
|
}, className: "text-xs w-32", placeholder: "0" }))) : null,
|
|
745
745
|
chartOptionControls.gapWidth ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
746
746
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Gap width (0-500)"),
|
|
747
|
-
react_1.default.createElement(ui_1.Input, { type: "number", min: 0, max: 500, value: (
|
|
747
|
+
react_1.default.createElement(ui_1.Input, { type: "number", min: 0, max: 500, value: (_36 = basicSpec.gapWidth) !== null && _36 !== void 0 ? _36 : "", onChange: function (e) {
|
|
748
748
|
return setFieldValue("spec.gapWidth", e.target.value === ""
|
|
749
749
|
? undefined
|
|
750
750
|
: Number(e.target.value));
|
|
751
751
|
}, className: "text-xs w-32", placeholder: "150" }))) : null,
|
|
752
752
|
chartOptionControls.overlap ? (react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
753
753
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Series overlap (-100 to 100)"),
|
|
754
|
-
react_1.default.createElement(ui_1.Input, { type: "number", min: -100, max: 100, value: (
|
|
754
|
+
react_1.default.createElement(ui_1.Input, { type: "number", min: -100, max: 100, value: (_37 = basicSpec.overlap) !== null && _37 !== void 0 ? _37 : "", onChange: function (e) {
|
|
755
755
|
return setFieldValue("spec.overlap", e.target.value === ""
|
|
756
756
|
? undefined
|
|
757
757
|
: Number(e.target.value));
|
|
@@ -759,7 +759,7 @@ var ChartEditor = function (_a) {
|
|
|
759
759
|
bubbleSpec && bubbleSpec.chartType === "scatter" ? (react_1.default.createElement(Section, { title: "Chart options" },
|
|
760
760
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
761
761
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Scatter style"),
|
|
762
|
-
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-56", value: (
|
|
762
|
+
react_1.default.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-56", value: (_38 = bubbleSpec.scatterStyle) !== null && _38 !== void 0 ? _38 : "lineMarker", onChange: function (e) {
|
|
763
763
|
return setFieldValue("spec.scatterStyle", e.target.value);
|
|
764
764
|
} },
|
|
765
765
|
react_1.default.createElement("option", { value: "lineMarker" }, "Straight lines with markers"),
|
|
@@ -770,12 +770,12 @@ var ChartEditor = function (_a) {
|
|
|
770
770
|
bubbleSpec ? (react_1.default.createElement(Section, { title: "Axis titles" },
|
|
771
771
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
772
772
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Vertical axis title"),
|
|
773
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
773
|
+
react_1.default.createElement(ui_1.Input, { value: (_39 = values === null || values === void 0 ? void 0 : values.spec.verticalAxisTitle) !== null && _39 !== void 0 ? _39 : "", type: "text", onChange: function (e) {
|
|
774
774
|
return setFieldValue("spec.verticalAxisTitle", e.target.value);
|
|
775
775
|
}, className: "text-xs", placeholder: "Vertical axis title" })),
|
|
776
776
|
react_1.default.createElement(ui_1.Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
777
777
|
react_1.default.createElement("label", { className: "font-system text-sm" }, "Horizontal axis title"),
|
|
778
|
-
react_1.default.createElement(ui_1.Input, { value: (
|
|
778
|
+
react_1.default.createElement(ui_1.Input, { value: (_40 = values === null || values === void 0 ? void 0 : values.spec.horizontalAxisTitle) !== null && _40 !== void 0 ? _40 : "", type: "text", onChange: function (e) {
|
|
779
779
|
return setFieldValue("spec.horizontalAxisTitle", e.target.value);
|
|
780
780
|
}, className: "text-xs", placeholder: "Horizontal axis title" })))) : null,
|
|
781
781
|
react_1.default.createElement(Section, { title: "Properties" },
|
|
@@ -60,7 +60,11 @@ export type ChartStylePreset = {
|
|
|
60
60
|
*/
|
|
61
61
|
export declare const CHART_STYLES: readonly ChartStylePreset[];
|
|
62
62
|
export declare const applyChartStyle: (spec: ChartSpec, style: ChartStylePreset) => ChartSpec;
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* A Quick Layouts gallery entry — where the title, legend, labels and axis
|
|
65
|
+
* titles go. `applyChartQuickLayout` stamps the entry's `id` on
|
|
66
|
+
* `spec.quickLayout` so the editor's control shows the applied layout.
|
|
67
|
+
*/
|
|
64
68
|
export type ChartQuickLayout = {
|
|
65
69
|
id: number;
|
|
66
70
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-styles.d.ts","sourceRoot":"","sources":["../../../utils/chart-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EAEV,MAAM,2BAA2B,CAAC;AAEnC;;;;;;GAMG;AAEH,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EA4C5D,CAAC;AAsBF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,SAAS,EACf,SAAS,iBAAiB,KACzB,SAGD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,SAAS,KAAG,SAC9B,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,SAAS,EAC5C,UAAU,SAAS,MAAM,EAAE,KAC1B,MAAM,EAGU,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AAmDF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAwInD,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,SAAS,EACf,OAAO,gBAAgB,KACtB,SAA8B,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"chart-styles.d.ts","sourceRoot":"","sources":["../../../utils/chart-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EAEV,MAAM,2BAA2B,CAAC;AAEnC;;;;;;GAMG;AAEH,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EA4C5D,CAAC;AAsBF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,SAAS,EACf,SAAS,iBAAiB,KACzB,SAGD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,SAAS,KAAG,SAC9B,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,SAAS,EAC5C,UAAU,SAAS,MAAM,EAAE,KAC1B,MAAM,EAGU,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AAmDF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAwInD,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,SAAS,EACf,OAAO,gBAAgB,KACtB,SAA8B,CAAC;AAElC;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AA0BF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAqE1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,MAAM,SAAS,EACf,QAAQ,gBAAgB,KACvB,SAAgE,CAAC"}
|
|
@@ -279,5 +279,5 @@ exports.CHART_QUICK_LAYOUTS = [
|
|
|
279
279
|
},
|
|
280
280
|
},
|
|
281
281
|
];
|
|
282
|
-
var applyChartQuickLayout = function (spec, layout) { return layout.apply(spec); };
|
|
282
|
+
var applyChartQuickLayout = function (spec, layout) { return (tslib_1.__assign(tslib_1.__assign({}, layout.apply(spec)), { quickLayout: layout.id })); };
|
|
283
283
|
exports.applyChartQuickLayout = applyChartQuickLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-editor.d.ts","sourceRoot":"","sources":["../../../../components/editors/chart-editor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,2BAA2B,CAAC;AAuBnC,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AA4CvC,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC;;;;OAIG;IACH,kBAAkB,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAuBF,eAAO,MAAM,WAAW,GAAI,sEAMzB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"chart-editor.d.ts","sourceRoot":"","sources":["../../../../components/editors/chart-editor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,2BAA2B,CAAC;AAuBnC,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AA4CvC,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC;;;;OAIG;IACH,kBAAkB,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAuBF,eAAO,MAAM,WAAW,GAAI,sEAMzB,gBAAgB,sBAo6DlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -482,13 +482,13 @@ export const ChartEditor = ({ chart, sheetId, onSubmit, onRequestMoveChart, getF
|
|
|
482
482
|
}))),
|
|
483
483
|
React.createElement(Stack, { direction: "vertical", className: "gap-1 pb-2" },
|
|
484
484
|
React.createElement("label", { className: "font-system text-sm" }, "Quick layout"),
|
|
485
|
-
React.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: "", "aria-label": "Quick layout", onChange: (e) => {
|
|
485
|
+
React.createElement("select", { className: "border border-rnc-border rounded-sm px-1 py-1 text-xs bg-transparent w-32", value: values.spec.quickLayout ?? "", "aria-label": "Quick layout", onChange: (e) => {
|
|
486
486
|
const layout = CHART_QUICK_LAYOUTS.find((entry) => String(entry.id) === e.target.value);
|
|
487
487
|
if (layout) {
|
|
488
488
|
setFieldValue("spec", applyChartQuickLayout(values.spec, layout));
|
|
489
489
|
}
|
|
490
490
|
} },
|
|
491
|
-
React.createElement("option", { value: "" }, "Choose a layout\u2026"),
|
|
491
|
+
React.createElement("option", { value: "", disabled: true }, "Choose a layout\u2026"),
|
|
492
492
|
CHART_QUICK_LAYOUTS.map((layout) => (React.createElement("option", { key: layout.id, value: layout.id }, layout.label))))),
|
|
493
493
|
React.createElement("div", null,
|
|
494
494
|
React.createElement(Button, { type: "button", size: "xs", onClick: () => setFieldValue("spec", resetChartToMatchStyle(values.spec)) }, "Reset to match style")),
|
|
@@ -60,7 +60,11 @@ export type ChartStylePreset = {
|
|
|
60
60
|
*/
|
|
61
61
|
export declare const CHART_STYLES: readonly ChartStylePreset[];
|
|
62
62
|
export declare const applyChartStyle: (spec: ChartSpec, style: ChartStylePreset) => ChartSpec;
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* A Quick Layouts gallery entry — where the title, legend, labels and axis
|
|
65
|
+
* titles go. `applyChartQuickLayout` stamps the entry's `id` on
|
|
66
|
+
* `spec.quickLayout` so the editor's control shows the applied layout.
|
|
67
|
+
*/
|
|
64
68
|
export type ChartQuickLayout = {
|
|
65
69
|
id: number;
|
|
66
70
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-styles.d.ts","sourceRoot":"","sources":["../../../utils/chart-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EAEV,MAAM,2BAA2B,CAAC;AAEnC;;;;;;GAMG;AAEH,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EA4C5D,CAAC;AAsBF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,SAAS,EACf,SAAS,iBAAiB,KACzB,SAGD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,SAAS,KAAG,SAC9B,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,SAAS,EAC5C,UAAU,SAAS,MAAM,EAAE,KAC1B,MAAM,EAGU,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AAmDF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAwInD,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,SAAS,EACf,OAAO,gBAAgB,KACtB,SAA8B,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"chart-styles.d.ts","sourceRoot":"","sources":["../../../utils/chart-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EAEV,MAAM,2BAA2B,CAAC;AAEnC;;;;;;GAMG;AAEH,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EA4C5D,CAAC;AAsBF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,SAAS,EACf,SAAS,iBAAiB,KACzB,SAGD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,SAAS,KAAG,SAC9B,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,SAAS,EAC5C,UAAU,SAAS,MAAM,EAAE,KAC1B,MAAM,EAGU,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AAmDF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAwInD,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,SAAS,EACf,OAAO,gBAAgB,KACtB,SAA8B,CAAC;AAElC;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AA0BF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAqE1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,MAAM,SAAS,EACf,QAAQ,gBAAgB,KACvB,SAAgE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rowsncolumns/charts",
|
|
3
|
-
"version": "28.1.
|
|
3
|
+
"version": "28.1.2",
|
|
4
4
|
"author": "Vinay M",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"world-atlas": "^2.0.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@rowsncolumns/calculator": ">=7.3.
|
|
70
|
-
"@rowsncolumns/common-types": ">=5.
|
|
71
|
-
"@rowsncolumns/grid": ">=13.2.
|
|
72
|
-
"@rowsncolumns/icons": ">=7.2.
|
|
73
|
-
"@rowsncolumns/spreadsheet": ">=10.4.
|
|
74
|
-
"@rowsncolumns/spreadsheet-state": ">=29.1.
|
|
75
|
-
"@rowsncolumns/toolkit": ">=24.5.
|
|
76
|
-
"@rowsncolumns/ui": ">=16.0.
|
|
77
|
-
"@rowsncolumns/utils": ">=9.
|
|
69
|
+
"@rowsncolumns/calculator": ">=7.3.1",
|
|
70
|
+
"@rowsncolumns/common-types": ">=5.3.1",
|
|
71
|
+
"@rowsncolumns/grid": ">=13.2.35",
|
|
72
|
+
"@rowsncolumns/icons": ">=7.2.33",
|
|
73
|
+
"@rowsncolumns/spreadsheet": ">=10.4.2",
|
|
74
|
+
"@rowsncolumns/spreadsheet-state": ">=29.1.4",
|
|
75
|
+
"@rowsncolumns/toolkit": ">=24.5.4",
|
|
76
|
+
"@rowsncolumns/ui": ">=16.0.3",
|
|
77
|
+
"@rowsncolumns/utils": ">=9.5.1",
|
|
78
78
|
"@types/react-plotly.js": "^2.6.3",
|
|
79
79
|
"echarts": "^5.6.0",
|
|
80
80
|
"formik": "^2.4.6",
|