|
1 | 1 | import { customElement, property, state } from "lit/decorators"; |
2 | 2 | import { LitElement, html, css } from "lit"; |
3 | 3 | import type { EChartsType } from "echarts/core"; |
4 | | -import type { CallbackDataParams } from "echarts/types/dist/shared"; |
5 | 4 | import type { SankeySeriesOption } from "echarts/types/dist/echarts"; |
6 | | -import { SankeyChart } from "echarts/charts"; |
| 5 | +import type { CallbackDataParams } from "echarts/types/src/util/types"; |
7 | 6 | import memoizeOne from "memoize-one"; |
8 | 7 | import { ResizeController } from "@lit-labs/observers/resize-controller"; |
| 8 | +import SankeyChart from "../../resources/echarts/components/sankey/install"; |
9 | 9 | import type { HomeAssistant } from "../../types"; |
10 | | -import type { ECOption } from "../../resources/echarts"; |
| 10 | +import type { ECOption } from "../../resources/echarts/echarts"; |
11 | 11 | import { measureTextWidth } from "../../util/text"; |
12 | 12 | import { filterXSS } from "../../common/util/xss"; |
13 | 13 | import "./ha-chart-base"; |
@@ -39,7 +39,7 @@ type ProcessedLink = Link & { |
39 | 39 |
|
40 | 40 | const OVERFLOW_MARGIN = 5; |
41 | 41 | const FONT_SIZE = 12; |
42 | | -const NODE_GAP = 8; |
| 42 | +const NODE_GAP = 6; |
43 | 43 | const LABEL_DISTANCE = 5; |
44 | 44 |
|
45 | 45 | @customElement("ha-sankey-chart") |
@@ -164,6 +164,7 @@ export class HaSankeyChart extends LitElement { |
164 | 164 | lineStyle: { |
165 | 165 | color: "gradient", |
166 | 166 | opacity: 0.4, |
| 167 | + curveness: 0.5, |
167 | 168 | }, |
168 | 169 | layoutIterations: 0, |
169 | 170 | label: { |
|
0 commit comments