码迷,mamicode.com
首页 > 其他好文 > 详细

highcharts去掉x轴,y轴,轴线以及刻度

时间:2018-01-24 19:45:22      阅读:876      评论:0      收藏:0      [点我收藏+]

标签:tooltip   rgba   gpo   series   http   file   拖动   form   highchart   

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 }] }); });

 

highcharts去掉x轴,y轴,轴线以及刻度

标签:tooltip   rgba   gpo   series   http   file   拖动   form   highchart   

原文地址:https://www.cnblogs.com/rachelch/p/8342959.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!