lineSeries.tsx 707 B

12345678910111213141516171819202122232425262728
  1. import 'echarts/lib/chart/line';
  2. import type {LineSeriesOption} from 'echarts';
  3. import theme from 'sentry/utils/theme';
  4. export default function LineSeries(props: LineSeriesOption): LineSeriesOption {
  5. return {
  6. showSymbol: false,
  7. symbolSize: theme.charts.symbolSize,
  8. ...props,
  9. type: 'line',
  10. emphasis: {
  11. ...props.emphasis,
  12. scale: false,
  13. lineStyle: {
  14. // disable color highlight on hover
  15. color: props.color as string,
  16. width: undefined,
  17. },
  18. areaStyle: {
  19. // Disable AreaSeries highlight on hover
  20. color: props.areaStyle?.color ?? (props.color as string),
  21. opacity: props.areaStyle?.opacity,
  22. },
  23. },
  24. };
  25. }