html画折线图坐标显示,将xAxis上的标签隐藏在画布中的折线图中Html5

我正在实施折线图,我想从折线图中隐藏x'Axis标签。我把scaleFontSize:0,,比x'Axis和Y'axis标签隐藏起来。但我只想隐藏x'Axis标签。将xAxis上的标签隐藏在画布中的折线图中Html5

var lineOptions = {

///Boolean - Whether grid lines are shown across the chart

scaleShowGridLines : true,

//String - Colour of the grid lines

scaleGridLineColor : "rgba(0,0,0,.05)",

//Number - Width of the grid lines

scaleGridLineWidth : 1,

//Boolean - Whether the line is curved between points

bezierCurve : true,

//Number - Tension of the bezier curve between points

bezierCurveTension : 0.4,

//Boolean - Whether to show a dot for each point

pointDot : true,

//Number - Radius of each point dot in pixels

pointDotRadius : 4,

//Number - Pixel width of point dot stroke

pointDotStrokeWidth : 1,

//Number - amount extra to add to the radius to cater for hit detection outside the drawn point

pointHitDetectionRadius : 20,

//Boolean - Whether to show a stroke for datasets

datasetStroke : true,

//Number - Pixel width of dataset stroke

datasetStrokeWidth : 2,

//Boolean - Whether to fill the dataset with a colour

datasetFill : true,

//Boolean - Re-draw chart on page resize

responsive: true,

//String - A legend template

legendTemplate : "

  • -legend\">
  • \">
"

};

var lineData = {

labels: data,

datasets: [

{

pointHighlightStroke: "rgba(151,187,205,1)",

data: []

}

]

};

var getElement = document.getElementById("departuresChart2");

var ctx = getElement.getContext("2d");

$scope.myNewChart = new Chart(ctx).Line(lineData, lineOptions);

2017-10-06

V SH

+0

请告诉我们什么是错用小提琴或图片。 –

+0

@artgb。我不能让jsfddle。因为我不能公开我的代码。但是我会提供屏幕截图 –

+0

您使用哪个版本的chart.js? –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值