data.*?],
能匹配到三次结果,但后面加{2}也取不到第二次的内容,求援助
<script type="text/javascript">
"use strict";
//折线图
var myChart = echarts.init(document.getElementById('dealCharts'));
var option_0 = {
title: {},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
lineStyle: {
color: '#000'
},
z: 1
},
backgroundColor:'rgb(255,255,255)',
extraCssText:'box-shadow:0 0 3px 3px rgba(0, 0, 0, 0.3)',
textStyle:{
color:'#333'
},
formatter: function (target) {
if(target[1].data==0){
return '';
}
var date=new Date(target[0].axisValue * 1000);
var text='';
text+=date.getFullYear()+'年'+ (date.getMonth()+1) +"月";
if(target[0].seriesName){
text+='</br>';
text+=target[0].marker;
text+=target[0].seriesName;
text+=':'+target[0].data+'元/㎡';
}
if(target[1].seriesName){
text+='</br>';
text+='<span style="display:inline-block;margin-right:5px;width:9px;height:9px;background-color:rgb(253,201,21);"></span>';
text+=target[1].seriesName;
text+=':'+target[1].data+'套';
}
return text;
}
},
grid: {
left: '0',
right: '0',
bottom: '0',
containLabel: true
},
legend: {
x: 'left',
show: true,
selectedMode:false, //取消图例上的点击事件
data: ['成交均价', '成交量']
},
xAxis: {
data: ["1593532800","1596211200","1598889600","1601481600","1604160000","1606752000","1609430400","1612108800","1614528000","1617206400","1619798400","1622476800"],
axisLabel: {
interval: 0,
formatter: function (value) {
var date = new Date(value * 1000);
return (date.getMonth()+1) + '月';
}
},
axisLine: {
lineStyle: {
color: '#999'
}
}
},
yAxis: [
{
type: 'value',
axisLine: {
show: true,
lineStyle: {
color: '#999'
}
},
axisTick: {
show: false
},
splitLine: {
//show:false
},
min: 0,
max:50000,
interval: 10000 },
{
type: 'value',
axisLine: {
show: true,
lineStyle: {
color: '#999'
}
},
axisTick: {
show: false
},
splitLine: {
show: true,
lineStyle: {
color: '#dadada'
}
},
min: 0,
max:10,
interval: 2 }
],
series: [
{
name: '成交均价',
type: 'line',
data: [33230,30434,30434,30434,30434,32982,31456,31456,35151,35580,29397,29397],
symbol: 'circle',
symbolSize: 6,
itemStyle: {
normal: {
color: "rgb(246,160,9)",
borderColor: 'rgba(246,160,9,0.3)',
borderWidth: 6, }
},
lineStyle: {
normal: {
color: "rgb(246,160,9)",
width: 1
}
}
},
{
name: '成交量',
type: 'bar',
yAxisIndex: 1,
data: [1,1,0,0,0,1,1,0,1,1,2,0],
barWidth: 18, itemStyle: {
normal: {color: 'rgb(253,201,21)'}
}
}
]
};