260225_01_ENH: 실제 Data 통계 API와 연결 및 일부 페이지 축소
This commit is contained in:
@@ -14,11 +14,11 @@ import { GroupedStackBarData, ShowLabel} from "../types";
|
||||
import { buildLgPalette } from "@/components/lge-dashboard/color";
|
||||
import {getIsShowLabel, roundedRectIcon} from "@/components/lge-dashboard/chart/utill";
|
||||
import {AXIS_HIDE_STYLE} from "@/const/lgConst";
|
||||
import { CHART_HEIGHTS, LEGEND_ITEM_SIZE } from "@/const/chartConst";
|
||||
import { LEGEND_ITEM_SIZE } from "@/const/chartConst";
|
||||
|
||||
type Props = {
|
||||
data: GroupedStackBarData;
|
||||
height?: number;
|
||||
height?: number | string;
|
||||
|
||||
tooltip?: TooltipComponentOption;
|
||||
grid?: GridComponentOption;
|
||||
@@ -34,7 +34,7 @@ type Props = {
|
||||
|
||||
const GroupedStackBar = ({
|
||||
data,
|
||||
height = CHART_HEIGHTS.DEFAULT,
|
||||
height,
|
||||
tooltip,
|
||||
grid,
|
||||
xAxis,
|
||||
@@ -61,6 +61,7 @@ const GroupedStackBar = ({
|
||||
const defaultYAxis: EChartsOption["yAxis"] = { type: "value", ...AXIS_HIDE_STYLE };
|
||||
|
||||
const latestYear = years.at(-1);
|
||||
console.log(yearBrandPalette, String(latestYear), yearBrandPalette?.[String(latestYear)])
|
||||
const latestPalette = buildLgPalette(yearBrandPalette?.[String(latestYear)]);
|
||||
|
||||
const yearLegendTokens = years.map((y) => {
|
||||
@@ -111,7 +112,7 @@ const GroupedStackBar = ({
|
||||
const brand = brands[bi];
|
||||
const row = data.values?.[yi]?.[bi] ?? [];
|
||||
|
||||
const isYearOn = yearSelected[yearLabel] !== false;
|
||||
const isYearOn = yearSelected[yearLabel];
|
||||
const showLabel = getIsShowLabel(showFocusLabel, yi, years.length);
|
||||
|
||||
realSeries.push({
|
||||
|
||||
Reference in New Issue
Block a user