| - | - {/* First column for categories */} -
-
- A
-
- |
- {/* Data columns for each series */}
- {chartData && chartData.data.series && chartData.data.series.map((_, index) => (
-
-
-
- {getColumnLetter(index + 1)}
-
-
- |
- ))}
- - - | -
|---|---|---|---|
| - | - {chartData.data.series.map((series, index) => ( - | - { - const newSeries = chartData.data.series.map((s, i) => - i === index ? { ...s, name: e.target.value } : s - ); - onChartDataChange({ - ...chartData, - data: { - ...chartData.data, - series: newSeries - } - }); - }} - className="border-0 focus-visible:ring-0 focus:ring-0 h-7 text-[13px] bg-transparent" - /> - | - ))} -- |
| - {rowIndex + 1} - | - - {/* Category Cell */} -setSelectedCell({ row: rowIndex, col: 0 })} - > - handleCategoryChange(rowIndex, e.target.value)} - className="border-0 focus-visible:ring-0 focus:ring-0 h-7 text-[13px] bg-transparent" - /> - | - - - {/* Series Data Cells */} - {/* series name */} - {chartData.data.series.map((series, seriesIndex) => ( -setSelectedCell({ row: rowIndex, col: seriesIndex + 1 })} - > - handleValueChange(rowIndex, seriesIndex, e.target.value)} - className="border-0 focus-visible:ring-0 focus:ring-0 h-7 text-[13px] bg-transparent text-right" - /> - | - ))} - -- - | -