jq css 曲线图,jQuery.flot 响应式曲线图表

JavaScript

语言:

JaveScriptBabelCoffeeScript

确定

var spline_chart_options = {

grid: {

hoverable: true,

borderWidth: {

top: 0,

right: 0,

bottom: 0,

left: 0

},

clickable: true,

margin: {

top: 10,

right: 10,

bottom: 0,

left: 10

},

mouseActiveRadius: 30

},

xaxis: {

tickLength: 0,

show: true,

color: '#fff',

ticks: [

[1, "Sat"],

[2, "Sun"],

[3, "Mon"],

[4, "Tue"],

[5, "Wed"],

[6, "Thu"],

[7, "Fri"]

]

},

yaxis: {

ticks: false,

tickLength: 0

},

tooltip: {

show: true,

cssClass: "flot-tt",

content: "%y",

defaultTheme: false

},

colors: ["#fff"]

};

// Chart 1

var chart_data = {

splines: {

show: true,

tension: 0.4,

lineWidth: 4,

fill: 0

},

points: {

show: true,

lineWidth: 1.5,

radius: 3,

symbol: "circle",

fill: true,

fillColor: "#ffffff"

},

data: [

[1, 4000],

[2, 3600],

[3, 6000],

[4, 3700],

[5, 4000],

[6, 3400],

[7, 5200]

]

};

// Chart 2

var spline_chart_data = {

splines: {

show: true,

tension: 0.4,

lineWidth: 4,

fill: 0

},

points: {

show: true,

lineWidth: 1.5,

radius: 3,

symbol: "circle",

fill: true,

fillColor: "#ffffff"

},

data: [

[1, 3500],

[2, 3600],

[3, 4000],

[4, 3800],

[5, 5000],

[6, 3800],

[7, 4200]

]

};

var SpLineChart = $.plot($("#spline-chart"), [chart_data], spline_chart_options);

var SpLineChart = $.plot($("#chart"), [spline_chart_data], spline_chart_options);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值