CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-lightdash--common

tessl install tessl/npm-lightdash--common@0.2231.5

Shared TypeScript library for the Lightdash platform containing common types, utilities, and business logic for analytics workflows

Agent Success

Agent success rate when using this tile

72%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.09x

Baseline

Agent success rate without this tile

66%

rubric.jsonevals/scenario-1/

{
  "context": "This evaluation criteria assesses how well the engineer uses @lightdash/common's chart type system to implement type-safe chart configuration utilities. The focus is on correct usage of ChartType and ChartKind enums, type guards with TypeScript type predicates, conversion logic that inspects chart configurations, and Set-based detection for mixed chart types.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "ChartType enum usage",
      "description": "Implementation correctly uses ChartType enum values (CARTESIAN, PIE, TABLE, BIG_NUMBER, FUNNEL) in getChartType() function. Properly maps ChartKind values to their corresponding ChartType categories. Returns ChartType.CARTESIAN as the default when chartKind is undefined.",
      "max_score": 20
    },
    {
      "name": "ChartKind mapping logic",
      "description": "Implementation correctly uses ChartKind enum values (LINE, VERTICAL_BAR, HORIZONTAL_BAR, AREA, SCATTER, MIXED, PIE, TABLE, BIG_NUMBER, FUNNEL) in getChartKind() function. Properly maps simple types (PIE, TABLE, BIG_NUMBER, FUNNEL) 1-to-1, and correctly inspects CARTESIAN chart configurations to determine specific chart kinds.",
      "max_score": 25
    },
    {
      "name": "Cartesian series inspection",
      "description": "For CARTESIAN chart type, correctly uses isCartesianChartConfig() type guard to validate configuration structure, accesses series[0].type to examine CartesianSeriesType (LINE, BAR, SCATTER, AREA), checks series[0].areaStyle to differentiate LINE from AREA charts, and examines layout.flipAxes to determine HORIZONTAL_BAR vs VERTICAL_BAR.",
      "max_score": 25
    },
    {
      "name": "Type guard implementation",
      "description": "Implements type guards (isCartesianChartConfig, isPieChartConfig, isTableChartConfig) using TypeScript type predicates (config is CartesianChart syntax). Correctly checks for presence of distinguishing properties: layout and eChartsConfig for Cartesian, groupFieldIds for Pie, columns for Table. Includes proper null/undefined checks.",
      "max_score": 15
    },
    {
      "name": "Mixed chart detection",
      "description": "Implements isSeriesWithMixedChartTypes() using Set to count distinct series types. Correctly differentiates LINE charts with and without areaStyle by including areaStyle in the uniqueness check (e.g., concatenating type with areaStyle). Returns true when Set.size >= 2, indicating 2 or more distinct chart types in the series array.",
      "max_score": 15
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@lightdash/common@0.2231.x
tile.json