| | |
| | | <template> |
| | | <div class="Echarts_box" :style="{ width: width, height: height }"> |
| | | <div id="myEchartsBIG" style="width: 100%; height: 100%"></div> |
| | | <div |
| | | class="Echarts_box" |
| | | :style="{ width: width, height: height }" |
| | | > |
| | | <div |
| | | id="myEchartsBIG" |
| | | style="width: 100%; height: 100%" |
| | | ></div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | |
| | | let dataLength; |
| | | let data = []; |
| | | onMounted(() => { |
| | | console.log(props.layerData); |
| | | props.layerData.points.forEach((e, i) => { |
| | | xAxisData.value.push(returnFloat1(e.len)); |
| | | }); |
| | |
| | | document.getElementById("myEchartsBIG"), |
| | | "purple-passion" |
| | | ); |
| | | var val = xAxisData.value.filter(res=>{ |
| | | return res /1000; |
| | | }) |
| | | debugger |
| | | chart.setOption({ |
| | | title: { |
| | | text: "", |
| | |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: xAxisData.value, |
| | | name: "米(m)", |
| | | data:val, |
| | | name: "千米(KM)", |
| | | axisLabel: { |
| | | //x轴文字的配置 |
| | | showMinLabel: true, // 强制显示最小值标签 |
| | |
| | | tooltip: { |
| | | trigger: "axis", |
| | | }, |
| | | |
| | | yAxis: { |
| | | type: "value", |
| | | }, |