2

I have a timeline using google react charts.

const columns = [
  { type: "string", id: "President" },
  { type: "string", id: "dummy bar label" },
  { type: "string", role: "tooltip" },
  { type: "date", id: "Start" },
  { type: "date", id: "End" }
];

const rows = [
  ["Washington", null, "George", new Date(1789, 3, 29), new Date(1797, 2, 3)],
  ["Adams", null, "John", new Date(1797, 2, 3), new Date(1801, 2, 3)],
  ["Jefferson", null, "Thomas", new Date(1801, 2, 3), new Date(1809, 2, 3)]
];
 <Chart
          chartType="Timeline"
          data={[columns, ...rows]}
          width="100%"
          height="400px"
        />

I want to add an icon to a specific day in the chart, on top of the bar (like in the image shown below). timeline with icon

Codesandbox: https://codesandbox.io/s/rakannimerreact-google-charts-timeline-with-tooltip-ry6yi

r342346
  • 119
  • 1
  • 15

0 Answers0