module.tsx 864 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Libraries
  2. import _ from 'lodash';
  3. import React, { PureComponent } from 'react';
  4. // Components
  5. import Graph from 'app/viz/Graph';
  6. // Utils
  7. import { getTimeSeriesVMs } from 'app/viz/state/timeSeries';
  8. // Types
  9. import { PanelProps } from 'app/types';
  10. interface Options {
  11. showBars: boolean;
  12. }
  13. interface Props extends PanelProps {
  14. options: Options;
  15. }
  16. export class Graph2 extends PureComponent<Props> {
  17. constructor(props) {
  18. super(props);
  19. }
  20. render() {
  21. const { timeSeries, timeRange } = this.props;
  22. const viewModels = getTimeSeriesVMs({ timeSeries });
  23. console.log(viewModels);
  24. return <Graph timeSeries={viewModels} timeRange={timeRange} />;
  25. }
  26. }
  27. export class TextOptions extends PureComponent<any> {
  28. render() {
  29. return <p>Text2 Options component</p>;
  30. }
  31. }
  32. export { Graph2 as PanelComponent, TextOptions as PanelOptions };