highcharts去掉x軸,y軸,軸線以及刻度

var chart = null;
$.getJSON('https://data.jianshukeji.com/jsonp?filename=json/usdeur.json&callback=?', function (data) {
    chart = Highcharts.chart('container', {
        chart: {
            zoomType: 'x'
        },
        title: {
            text: '美圓兌歐元匯率走勢圖'
        },
        subtitle: {
            text: document.ontouchstart === undefined ?
            '鼠標拖動能夠進行縮放' : '手勢操做進行縮放'
        },
        xAxis: {
           lineWidth :0,//去掉x軸線 tickWidth:0,//去掉刻度
 labels: { enabled: false },//去掉刻度數字
            type: 'datetime',
            dateTimeLabelFormats: {
                millisecond: '%H:%M:%S.%L',
                second: '%H:%M:%S',
                minute: '%H:%M',
                hour: '%H:%M',
                day: '%m-%d',
                week: '%m-%d',
                month: '%Y-%m',
                year: '%Y'
            }
        },
        tooltip: {
            dateTimeLabelFormats: {
                millisecond: '%H:%M:%S.%L',
                second: '%H:%M:%S',
                minute: '%H:%M',
                hour: '%H:%M',
                day: '%Y-%m-%d',
                week: '%m-%d',
                month: '%Y-%m',
                year: '%Y'
            }
        },
        yAxis: {
        tickWidth:0,//去掉刻度 gridLineWidth: 0,//去掉y軸方向的橫線 labels: { enabled: false },//去掉刻度數字 title: { text: '匯率' } }, legend: { enabled: false }, plotOptions: { area: { fillColor: { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [ [0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')] ] }, marker: { radius: 2 }, lineWidth: 1, states: { hover: { lineWidth: 1 } }, threshold: null } }, series: [{ type: 'area', name: '美圓兌歐元', data: data }] }); });
相關文章
相關標籤/搜索