Skip to content

Commit

Permalink
Fix Vega-Lite type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Nov 28, 2024
1 parent 439c36d commit 92ee5c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/ActivityChart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import { VegaLite } from 'react-vega';
import { VisualizationSpec } from 'vega-lite';
import { BotActivity, ActivityType } from '../types';

interface ActivityChartProps {
Expand All @@ -8,7 +9,7 @@ interface ActivityChartProps {
}

export function ActivityChart({ activities, type }: ActivityChartProps) {
const spec = useMemo(() => ({
const spec: VisualizationSpec = useMemo(() => ({
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
data: {
values: activities
Expand All @@ -18,7 +19,7 @@ export function ActivityChart({ activities, type }: ActivityChartProps) {
status: a.status,
})),
},
mark: { type: 'line' },
mark: 'line',
encoding: {
x: {
field: 'date',
Expand Down

0 comments on commit 92ee5c4

Please sign in to comment.