index.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import React from 'react';
  2. import * as d3Scale from 'd3-scale';
  3. import * as d3Array from 'd3-array';
  4. import * as d3Color from 'd3-color';
  5. import * as d3Format from 'd3-format';
  6. import * as d3Interpolate from 'd3-interpolate';
  7. import * as d3Shape from 'd3-shape';
  8. import * as d3Zoom from 'd3-zoom';
  9. import * as d3Timer from 'd3-timer';
  10. import * as d3Ease from 'd3-ease';
  11. export const d3: typeof d3Scale & typeof d3Array & typeof d3Color & typeof d3Format & typeof d3Interpolate & typeof d3Shape & typeof d3Zoom & typeof d3Ease & typeof d3Timer;
  12. /**
  13. * Stock Heatmap
  14. * @author Rounak Saha
  15. *
  16. * © Copyright 2020, Rounak Saha
  17. */
  18. export default class StockHeatmap extends React.Component<{
  19. /** The width of the heatmap */
  20. width: number,
  21. /** The height of the heatmap */
  22. height: number
  23. }> {
  24. /**
  25. * Set Data for the Heatmap to generate
  26. * @param {any[]} data The data to set
  27. */
  28. setData: (data: any[]) => void;
  29. /**
  30. * Add as extra data to existing data array.
  31. * @param {any} data
  32. */
  33. addData: (data: any) => void;
  34. /**
  35. * This sets the Heatmap Zoom level aka. window.
  36. * @param {number} zoom The seconds to zoom into
  37. */
  38. setZoomLevel: (zoom: number) => void;
  39. }