Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d01441f
refactor: extract shared cartesian renderer and rename layout util
vmantovani Mar 6, 2026
f14956b
refactor: move chart core to src root and clarify naming
vmantovani Mar 6, 2026
baf30b0
refactor: remove deferred renderers from chart facade for clearer and…
vmantovani Mar 6, 2026
31df5a2
refactor: split index logic into core/* and rename internal helpers
vmantovani Mar 6, 2026
c8682f9
refactor: simplify core method maps and make inline defaults safer
vmantovani Mar 6, 2026
1ade08f
adjust lint
vmantovani Mar 6, 2026
ef8c258
refactor: clarify instance renderer naming and isolate legacy adapter…
vmantovani Mar 9, 2026
af46588
WIP: update render signature flow, tests, and skills lock
vmantovani Mar 9, 2026
6df0710
refactor: normalize instance render inputs with safe fallbacks
vmantovani Mar 9, 2026
ff29f84
refactor: inject type dispatcher to reduce chart instance coupling wi…
vmantovani Mar 9, 2026
379c36f
fix: stabilize runtime ids for clipPath and update pie/donut examples
vmantovani Mar 10, 2026
ce2baf4
refactor: allow composition without entity and stabilize inline tooltips
vmantovani Mar 11, 2026
ff59321
refactor: support CartesianGrid stroke customization
vmantovani Mar 11, 2026
2048d01
feat: add composed renderer + generic renderChart for mixed cartesian…
vmantovani Mar 12, 2026
f3dbf85
fix: make composed series render correctly (band x-scale) and align t…
vmantovani Mar 12, 2026
d960d1e
refactor: update composition demos to match composed chart
vmantovani Mar 12, 2026
be9de0e
refactor: move composition orchestration to composed renderer and dum…
vmantovani Mar 12, 2026
e0b0687
refactor: simplify bar renderer and delegate orchestration to composed
vmantovani Mar 12, 2026
78c10f1
fix: detect function series in composed renderer and update bar test
vmantovani Mar 12, 2026
7f1aae1
refactor: add composed chart support for config style charts
vmantovani Mar 13, 2026
4c55303
refactor: extract shared cartesian children and renderer utilities
vmantovani Mar 13, 2026
29ea1be
refactor: introduce getResolvedEntity helper and sanitize composed co…
vmantovani Mar 16, 2026
01724a1
refactor: centralize shared constants and color palettes
vmantovani Mar 16, 2026
9663137
refactor: unify data key inference and complete context resolution
vmantovani Mar 16, 2026
56b6905
refactor: standardize context resolution across all renderers
vmantovani Mar 16, 2026
1df0fa3
refactor: rely on charts defaults for grid, axes, brush and tooltip
vmantovani Mar 16, 2026
00b4b25
test: add coverage for data key inference and cartesian context helpe…
vmantovani Mar 16, 2026
6e3d8be
refactor: adjust charts api to expose unified chart.render for compos…
vmantovani Mar 16, 2026
208f5c2
refactor: update web-charts examples to use unified chart.render in c…
vmantovani Mar 16, 2026
86f6eb6
fix: adjust area series render order so lower series stay visible on top
vmantovani Mar 16, 2026
85b0e71
feat: add composed chart config example mirroring composition mode
vmantovani Mar 16, 2026
0e6f12b
test: fix chart tests to use template render for config mode
vmantovani Mar 16, 2026
6e437e0
fix: replace deprecated chart.renderBarChart with chart.render after …
vmantovani Mar 16, 2026
726079a
test: fix zero-padding composition tests after rebase
vmantovani Mar 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 43 additions & 32 deletions examples/apps/web-charts/src/sections/area.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { html } from "@inglorious/web"
import { chart } from "@inglorious/charts"

const composedData = [
{ name: "Jan", revenue: 120, target: 80, forecast: 110 },
{ name: "Feb", revenue: 180, target: 130, forecast: 150 },
{ name: "Mar", revenue: 90, target: 140, forecast: 120 },
{ name: "Apr", revenue: 210, target: 170, forecast: 190 },
{ name: "May", revenue: 160, target: 220, forecast: 175 },
{ name: "Jun", revenue: 200, target: 180, forecast: 195 },
{ name: "Jul", revenue: 130, target: 190, forecast: 150 },
]

export function renderAreaSections(api) {
return html`
<div class="charts-comparison">
Expand All @@ -11,19 +21,16 @@ export function renderAreaSections(api) {

<section class="chart-section">
<h2>Area Chart - Recharts Style (Composition with api.getEntity)</h2>
${chart.renderAreaChart(
${chart.render(
api.getEntity("salesAreaChartComposition"),
{
width: 800,
height: 400,
dataKeys: ["value"],
children: [
chart.CartesianGrid({
stroke: "#eee",
strokeDasharray: "5 5",
}),
chart.CartesianGrid(),
chart.XAxis({ dataKey: "name" }),
chart.YAxis({ width: "auto" }),
chart.YAxis(),
chart.Area({
dataKey: "value",
fill: "#8884d8",
Expand All @@ -41,29 +48,39 @@ export function renderAreaSections(api) {

<div class="charts-comparison">
<section class="chart-section">
<h2>Area Chart - Composition (Padding 0)</h2>
${chart.renderAreaChart(
api.getEntity("salesAreaChartCompositionPadding"),
<h2>Composed Area + Line + Bar - Config Style</h2>
${api.render("composedSalesChart")}
</section>

<section class="chart-section">
<h2>Composed Area + Line + Bar - Recharts Style (Composition)</h2>
${chart.render(
{
width: 800,
height: 400,
padding: { top: 0, right: 0, bottom: 0, left: 0 },
dataKeys: ["value"],
data: composedData,
children: [
chart.CartesianGrid({
stroke: "#eee",
strokeDasharray: "5 5",
}),
chart.CartesianGrid(),
chart.XAxis({ dataKey: "name" }),
chart.YAxis({ width: "auto" }),
chart.YAxis(),
chart.Area({
dataKey: "value",
dataKey: "revenue",
fill: "#8884d8",
fillOpacity: "0.6",
fillOpacity: "0.3",
stroke: "#8884d8",
showDots: true,
showTooltip: true,
}),
chart.Bar({
dataKey: "target",
fill: "#82ca9d",
showTooltip: true,
}),
chart.Line({
dataKey: "forecast",
stroke: "#ff7300",
showDots: true,
}),
chart.Dots({ dataKey: "value", fill: "#8884d8" }),
chart.Tooltip({}),
],
},
api,
Expand All @@ -82,19 +99,16 @@ export function renderAreaSections(api) {
Area Chart Multi Series - Recharts Style (Composition with
api.getEntity)
</h2>
${chart.renderAreaChart(
${chart.render(
api.getEntity("multiSeriesAreaChartComposition"),
{
width: 800,
height: 400,
dataKeys: ["Revenue", "Expenses", "Profit"],
children: [
chart.CartesianGrid({
stroke: "#eee",
strokeDasharray: "5 5",
}),
chart.CartesianGrid(),
chart.XAxis({ dataKey: "name" }),
chart.YAxis({ width: "auto" }),
chart.YAxis(),
chart.Area({
dataKey: "Revenue",
fill: "#8884d8",
Expand Down Expand Up @@ -147,19 +161,16 @@ export function renderAreaSections(api) {
<h2>
Area Chart Stacked - Recharts Style (Composition with api.getEntity)
</h2>
${chart.renderAreaChart(
${chart.render(
api.getEntity("multiSeriesAreaChartStackedComposition"),
{
width: 800,
height: 400,
dataKeys: ["Revenue", "Expenses", "Profit"],
children: [
chart.CartesianGrid({
stroke: "#eee",
strokeDasharray: "5 5",
}),
chart.CartesianGrid(),
chart.XAxis({ dataKey: "name" }),
chart.YAxis({ width: "auto" }),
chart.YAxis(),
chart.Area({
dataKey: "Revenue",
fill: "#8884d8",
Expand Down
14 changes: 6 additions & 8 deletions examples/apps/web-charts/src/sections/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ export function renderBarSection(api) {

<section class="chart-section">
<h2>Bar Chart - Recharts Style (Composition with api.getEntity)</h2>
${chart.renderBarChart(
${chart.render(
api.getEntity("salesBarChartComposition"),
{
width: 800,
height: 400,
children: [
chart.CartesianGrid({
stroke: "#eee",
strokeDasharray: "3 3",
}),
chart.XAxis({ dataKey: "label" }),
chart.YAxis({ width: "auto" }),
chart.YAxis(),
chart.Bar({ dataKey: "value" }),
chart.Tooltip({}),
chart.Tooltip(),
],
},
api,
Expand All @@ -35,21 +34,20 @@ export function renderBarSection(api) {
<div class="charts-comparison">
<section class="chart-section">
<h2>Bar Chart - Composition (Padding 0)</h2>
${chart.renderBarChart(
${chart.render(
api.getEntity("salesBarChartCompositionPadding"),
{
width: 800,
height: 400,
padding: { top: 0, right: 0, bottom: 0, left: 0 },
children: [
chart.CartesianGrid({
stroke: "#eee",
strokeDasharray: "3 3",
}),
chart.XAxis({ dataKey: "label" }),
chart.YAxis({ width: "auto" }),
chart.YAxis(),
chart.Bar({ dataKey: "value" }),
chart.Tooltip({}),
chart.Tooltip(),
],
},
api,
Expand Down
75 changes: 74 additions & 1 deletion examples/apps/web-charts/src/sections/donut.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ import { html } from "@inglorious/web"
import { chart } from "@inglorious/charts"

export function renderDonutSection(api) {
const inlineDonutDataA = [
{ name: "A", value: 20 },
{ name: "B", value: 35 },
{ name: "C", value: 15 },
]
const inlineDonutDataB = [
{ name: "A", value: 10 },
{ name: "B", value: 25 },
{ name: "C", value: 40 },
]

return html`
<div class="charts-comparison">
<section class="chart-section">
Expand All @@ -11,7 +22,7 @@ export function renderDonutSection(api) {

<section class="chart-section">
<h2>Donut Chart - Recharts Style (Composition with api.getEntity)</h2>
${chart.renderPieChart(
${chart.render(
api.getEntity("categoryDonutChartComposition"),
{
width: 500,
Expand All @@ -33,5 +44,67 @@ export function renderDonutSection(api) {
)}
</section>
</div>

<div class="charts-comparison">
<section class="chart-section">
<h2>Donut Chart - Composition (No id #1)</h2>
${chart.render(
{
type: "donut",
data: inlineDonutDataA,
width: 360,
height: 280,
showTooltip: true,
},
{
width: 360,
height: 280,
centerText: "Total",
children: [
chart.Pie({
dataKey: "value",
nameKey: "name",
cx: "50%",
cy: "50%",
outerRadius: 90,
innerRadius: 54,
label: true,
}),
],
},
api,
)}
</section>

<section class="chart-section">
<h2>Donut Chart - Composition (No id #2)</h2>
${chart.render(
{
type: "donut",
data: inlineDonutDataB,
width: 360,
height: 280,
showTooltip: true,
},
{
width: 360,
height: 280,
centerText: "Total",
children: [
chart.Pie({
dataKey: "value",
nameKey: "name",
cx: "50%",
cy: "50%",
outerRadius: 90,
innerRadius: 54,
label: true,
}),
],
},
api,
)}
</section>
</div>
`
}
Loading