首页 > 编程知识 正文

echarts自定义图例,echarts自定义图标

时间:2023-05-05 02:38:16 阅读:25378 作者:3286

html

页面引用js script type=' text/JavaScript ' src=' assets/js/e charts.min.js '/script CSS和html*{padding:0; margin:0; border: 0; } divid=' container ' style=' width :630 px; height:250px; margin:20px auto'/div js

var DOM=document.getelementbyid (container ); varmychart=echarts.init(DOM ); var app={}; 选项=null; option={ title : }//text : ' monthly repayment (estimated )、subtext:'renta:$/qft2 '、x 3: ' left ' TTT。 axis pointer : { type : ' line ',line style : { color : ' # FAA 12f ' },z3360 255 ),extracsstext 3: (box-shhsh 0.3 )、文本样式: ) color:(#333 )、//boundaryGap: false、//split line : { show : false }、//网格线的//网格区域datate '6mth '、' 7mth '、'8mth '、'9MTH '、axisline:(/x轴线设定linestyle: ) type: ) solid ), color: ) ) #f0for axisLabel: {//x轴字体颜色text style : { color : ' # 949494 ',},取消axisTick:{//轴刻度yaxis 3360//name : ' Renta:$/qf T2 ',splitline:(//保留网格线show: true, 线样式: (//y轴网格线设置color : (# F9 F9 ' split area : { show : false },/网格区域axisLine: {//y轴设置线样式color: ' # f0f0f0} axis label : (/y轴字体颜色textstyle: ) color : ) #949494 ) },axistick:(/y轴刻度show : 2900,2500 ]、type:'line '、symbol:'circle '、//设置为实心点类型: " circle "、" rect "、" rounddding "、" arrow //点大小//showSymbol:true,hoverAnimation:true,animation: true,item style : { normal : } color : //点颜色border color : ' rgba 65251、222、153、0.5 )、borderwidder lineStyle: {//折线颜色大小type:'solid ',/width:1,border color 336601//text style : (//x,y轴字体颜色大小//fontSize:12,//color : (# 949494 ) if (选项类型选项===' object ' ) mychart.setoption (选项,真); }预览效果

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。