|
1 | | -<div class="vis-arco-chart-wrap"> |
2 | | - <div id="arco_{{ chart.chart_id }}" style="width: {{chart.width}}; height: {{chart.height}}"> |
| 1 | +<div class="vis-actor-chart-wrap"> |
| 2 | + <div id="vis-actor-{{ chart.chart_id }}" style="width: {{chart.width}}; height: {{chart.height}}"> |
3 | 3 | </div> |
4 | 4 | <script> |
5 | 5 | // -> 这里代码请使用es5来写 |
|
55 | 55 |
|
56 | 56 | function render(data_source) { |
57 | 57 | console.log('data_source', data_source); |
58 | | - let chart = new window.VChart.default("arco_{{chart.chart_id}}", data_source); |
59 | | - let teaColor = {{ chart.colors | safe |
60 | | - }} |
61 | | - chart.setColors(teaColor); |
| 58 | + let chart = new window.VChart.default("vis-actor-{{chart.chart_id}}", data_source); |
| 59 | + let defaultColor = {{ chart.colors | safe}} |
| 60 | + chart.setColors(defaultColor); |
62 | 61 | chart.renderAsync(); |
63 | 62 | // 移除.jp-RenderedHTMLCommon 对Table的样式, chart 的Tooltip是个Table |
64 | | - let target = document.querySelector("#arco_{{chart.chart_id}}").parentNode.parentNode; |
| 63 | + let target = document.querySelector("#vis-actor-{{chart.chart_id}}").parentNode.parentNode; |
65 | 64 | let classList = target.getAttribute("class"); |
66 | 65 | let ignoreList = ['rendered_html', 'jp-RenderedHTMLCommon']; |
67 | 66 | let newClassList = classList; |
|
88 | 87 | body > .jp-Notebook-cell.jp-mod-noInput > .jp-Cell-outputWrapper > .jp-Cell-outputArea, |
89 | 88 | body > .jp-Notebook-cell.jp-mod-noInput > .jp-Cell-outputWrapper > .jp-Cell-outputArea > .jp-OutputArea-child, |
90 | 89 | body > .jp-Notebook-cell.jp-mod-noInput > .jp-Cell-outputWrapper > .jp-Cell-outputArea > .jp-OutputArea-child > .jp-OutputArea-executeResult, |
91 | | - body > .jp-Notebook-cell.jp-mod-noInput > .jp-Cell-outputWrapper > .jp-Cell-outputArea > .jp-OutputArea-child > .jp-OutputArea-executeResult > .vis-arco-chart-wrap { |
| 90 | + body > .jp-Notebook-cell.jp-mod-noInput > .jp-Cell-outputWrapper > .jp-Cell-outputArea > .jp-OutputArea-child > .jp-OutputArea-executeResult > .vis-actor-chart-wrap { |
92 | 91 | height: 100%; |
93 | 92 | } |
94 | 93 | body { |
|
0 commit comments