index.d.ts 1.2 KB

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