Home > Web Front-end > JS Tutorial > Example code for highcharts usage

Example code for highcharts usage

PHP中文网
Release: 2017-06-19 17:43:49
Original
1290 people have browsed it
xAxis: {
    type: 'category',
    title:null,
    gridLineWidth: 1,
    lineColor: "#50ae93",
    labels: {
        style: {
            fontSize: '10px'},
        formatter: function() {var labelVal = this.value;var reallyVal = labelVal;var lvl = labelVal.length;if(lvl > 8 && lvl <=16){
                reallyVal = labelVal.substr(0,8)+"<br/>"+labelVal.substring(8,lvl);
            }else if(lvl > 16 && lvl <=24){
                reallyVal = labelVal.substr(0,8)+"<br/>"+labelVal.substr(8,8)+"<br/>"+labelVal.substring(16,lvl);
            }else if(lvl > 24){
                reallyVal = labelVal.substr(0,8)+"<br/>"+labelVal.substr(8,8)+"<br/>"+labelVal.substr(16,8)+"<br/>"+labelVal.substring(24,lvl);
            }            return reallyVal;
        }
    },
    categories:[&#39;测试2016到2017学年度测试2016到2017学年度测试2016到2017学年度&#39;,&#39;测试2016到2017学年度测试2016到2017学年度测试2016到2017学年度&#39;,&#39;测试2016到2017学年度测试2016到2017学年度测试2016到2017学年度&#39;]
},
Copy after login


The above is the detailed content of Example code for highcharts usage. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template