echarts icon indicating copy to clipboard operation
echarts copied to clipboard

在手机端用域名和IP两种方式访问,图表中的文字大小发生变化

Open xieyf0413 opened this issue 10 years ago • 1 comments

问题简述 (One-line summary)

web项目中,页面Jsp中用到了echarts,项目开始是用ip地址访问的,一切正常;后期申请了域名,在手机端访问页面时发现图表中的文字(包扎横坐标、纵坐标、图例以及图表上的数值)都变小了。而在Windows下访问正常。

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): V3.1.9
  • 浏览器类型和版本 (Browser version):
    • 微信内置浏览器
    • UC浏览器V10.9.10.788
    • Chrome45.0.2454.94
  • 操作系统类型和版本 (OS Version):
    • Android系统4.4.2

重现步骤 (Steps to reproduce)

1.在手机端口用IP地址直接访问打开页面; 2.在手机端用域名方式直接访问打开页面; 3.用域名方式打开页面,图表中的文字明显变小;

期望结果 (Expected behaviour)

图表中的所有文字保持一样大小

可能哪里有问题 (What went wrong)

未知

ECharts配置项 (ECharts option)

option = {
title : {
                text : tit,
                left : 'right',
                textStyle : {
                    color : 'rgb(199,199,199)',
                    fontStyle : 'normal',
                    fontWeight : 'normal',
                    fontFamily : 'sans-serif',
                    fontSize : 17
                },
            },
            tooltip : {
                show:false,
                showContent :false,
                /* trigger : 'axis', */
            },

            grid: {
                left: '1%',
                right: '1%',
                bottom: '5%',
                containLabel: true
            },
            xAxis : [ {
                type : 'category',
                splitLine: {
                    show:isHaveSplitLine,
                    lineStyle : {
                        color : "#666",
                        width : "1"
                    }
                },
                scale : 'false',
                axisLine : {
                    lineStyle : {
                        color : "#666",
                        width : "1"
                    }
                },
                boundaryGap : true,
                data : xdata,
                axisLabel : {
                    interval :0,
                    rotate :rotat,
                    formatter:function(val){
                        if(val !=undefined)
                            return val.split(";").join("\n");
                    },
                    textStyle : {
                        color : 'rgb(199,199,199)', //刻度颜色
                        fontSize : 9 
                    //刻度大小
                    }
                }
            } ],
            yAxis : [ {
                show : 'true',
                type : 'value',
                axisLine : {
                    lineStyle : {
                        color : "#666",
                        width : "1"
                    }
                },
                splitLine: {
                    lineStyle : {
                        color : "#666",
                        width : "1"
                    }
                },
                axisLabel : {
                    textStyle : {
                        color : 'rgb(199,199,199)', //刻度颜色
                        /* fontSize : 2  */
                    //刻度大小
                    },
                }
            } ],
            series : [ {
                type : type,
                data : ydata,
                lineStyle : {
                    normal : {
                        width : 3
                    }
                },
                itemStyle : {
                    normal : {
                        color : col
                    }
                },
                label : {
                    normal : {
                        show : 'true',
                        position : 'top',
                        textStyle : {
                            color : 'white',
                            fontSize:seriesDataTextFontSize,
                        }
                    }
                },
            }, ]

}

其他信息 (Other comments)

domain ip

xieyf0413 avatar May 17 '16 11:05 xieyf0413

This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.

echarts-bot avatar Jun 28 '19 08:06 echarts-bot