Primer Commit
This commit is contained in:
59
dist/js/pages/c3-chart/data/c3-category-data.js
vendored
Normal file
59
dist/js/pages/c3-chart/data/c3-category-data.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
/*************************************************************************************/
|
||||
// -->Template Name: Bootstrap Press Admin
|
||||
// -->Author: Themedesigner
|
||||
// -->Email: niravjoshi87@gmail.com
|
||||
// -->File: c3_chart_JS
|
||||
/*************************************************************************************/
|
||||
$(function() {
|
||||
var o = c3.generate({
|
||||
bindto: "#category-data",
|
||||
size: { height: 400 },
|
||||
color: { pattern: ["#4fc3f7", "#2962FF"] },
|
||||
data: {
|
||||
x: "x",
|
||||
columns: [
|
||||
["x", "www.site1.com", "www.site2.com", "www.site3.com", "www.site4.com"],
|
||||
["complete", 400, 200, 100, 40],
|
||||
["remaining", 190, 100, 140, 90]
|
||||
],
|
||||
groups: [
|
||||
["complete", "remaining"]
|
||||
],
|
||||
type: "bar"
|
||||
},
|
||||
axis: { x: { type: "category" } },
|
||||
grid: { y: { show: !0 } }
|
||||
});
|
||||
setTimeout(function() {
|
||||
o.load({
|
||||
columns: [
|
||||
["x", "www.siteA.com", "www.siteB.com", "www.siteC.com", "www.siteD.com"],
|
||||
["complete", 350, 200, 150, 150],
|
||||
["remaining", 190, 150, 290, 140]
|
||||
]
|
||||
})
|
||||
}, 1e3), setTimeout(function() {
|
||||
o.load({
|
||||
columns: [
|
||||
["x", "www.siteE.com", "www.siteF.com", "www.siteG.com"],
|
||||
["complete", 30, 300, 290],
|
||||
["remaining", 90, 230, 240]
|
||||
]
|
||||
})
|
||||
}, 2e3), setTimeout(function() {
|
||||
o.load({
|
||||
columns: [
|
||||
["x", "www.site1.com", "www.site2.com", "www.site3.com", "www.site4.com"],
|
||||
["complete", 130, 350, 200, 470],
|
||||
["remaining", 190, 130, 140, 340]
|
||||
]
|
||||
})
|
||||
}, 3e3), setTimeout(function() {
|
||||
o.load({
|
||||
columns: [
|
||||
["complete", 30, 130, 100, 170],
|
||||
["remaining", 190, 30, 140, 40]
|
||||
]
|
||||
})
|
||||
}, 4e3), setTimeout(function() { o.load({ url: "../c3_string_x.csv" }) }, 5e3)
|
||||
});
|
||||
21
dist/js/pages/c3-chart/data/c3-column-oriented.js
vendored
Normal file
21
dist/js/pages/c3-chart/data/c3-column-oriented.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/*************************************************************************************/
|
||||
// -->Template Name: Bootstrap Press Admin
|
||||
// -->Author: Themedesigner
|
||||
// -->Email: niravjoshi87@gmail.com
|
||||
// -->File: c3_chart_JS
|
||||
/*************************************************************************************/
|
||||
$(function() {
|
||||
var n = c3.generate({
|
||||
bindto: "#column-oriented",
|
||||
size: { height: 400 },
|
||||
color: { pattern: ["#2962FF", "#4fc3f7", "#f62d51"] },
|
||||
data: {
|
||||
columns: [
|
||||
["option1", 50, 60, 40, 50, 20, 30],
|
||||
["option2", 220, 130, 240, 90, 130, 200],
|
||||
["option3", 250, 250, 400, 160, 200, 300]
|
||||
]
|
||||
},
|
||||
grid: { y: { show: !0 } }
|
||||
});
|
||||
});
|
||||
23
dist/js/pages/c3-chart/data/c3-data-color.js
vendored
Normal file
23
dist/js/pages/c3-chart/data/c3-data-color.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/*************************************************************************************/
|
||||
// -->Template Name: Bootstrap Press Admin
|
||||
// -->Author: Themedesigner
|
||||
// -->Email: niravjoshi87@gmail.com
|
||||
// -->File: c3_chart_JS
|
||||
/*************************************************************************************/
|
||||
$(function() {
|
||||
var a = c3.generate({
|
||||
bindto: "#data-color",
|
||||
size: { height: 400 },
|
||||
data: {
|
||||
columns: [
|
||||
["data1", 130, 200, 150, 40, 360, 50],
|
||||
["data2", 100, 130, 100, 240, 130, 350],
|
||||
["data3", 300, 240, 360, 400, 250, 250]
|
||||
],
|
||||
type: "bar",
|
||||
colors: { data1: "#4fc3f7", data2: "#2962FF" },
|
||||
color: function(a, o) { return o.id && "data3" === o.id ? d3.rgb(a).darker(o.value / 150) : a }
|
||||
},
|
||||
grid: { y: { show: !0 } }
|
||||
});
|
||||
});
|
||||
37
dist/js/pages/c3-chart/data/c3-data-from-url.js
vendored
Normal file
37
dist/js/pages/c3-chart/data/c3-data-from-url.js
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*************************************************************************************/
|
||||
// -->Template Name: Bootstrap Press Admin
|
||||
// -->Author: Themedesigner
|
||||
// -->Email: niravjoshi87@gmail.com
|
||||
// -->File: c3_chart_JS
|
||||
/*************************************************************************************/
|
||||
$(function(e) {
|
||||
|
||||
// Callback that creates and populates a data table, instantiates the line chart, passes in the data and draws it.
|
||||
var lineChart = c3.generate({
|
||||
bindto: '#data-from-url',
|
||||
size: { height: 400 },
|
||||
color: {
|
||||
pattern: ['#2962FF', '#4fc3f7', '#f62d51']
|
||||
},
|
||||
|
||||
// Create the data table.
|
||||
data: {
|
||||
url: 'dist/js/pages/c3-chart/c3_test.csv'
|
||||
},
|
||||
grid: {
|
||||
y: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// Instantiate and draw our chart, passing in some options.
|
||||
setTimeout(function() {
|
||||
c3.generate({
|
||||
data: {
|
||||
url: 'dist/js/pages/c3-chart/c3_test.json',
|
||||
mimeType: 'json'
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
43
dist/js/pages/c3-chart/data/c3-data-order.js
vendored
Normal file
43
dist/js/pages/c3-chart/data/c3-data-order.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*************************************************************************************/
|
||||
// -->Template Name: Bootstrap Press Admin
|
||||
// -->Author: Themedesigner
|
||||
// -->Email: niravjoshi87@gmail.com
|
||||
// -->File: c3_chart_JS
|
||||
/*************************************************************************************/
|
||||
$(function() {
|
||||
var a = c3.generate({
|
||||
bindto: "#data-order",
|
||||
size: { height: 400 },
|
||||
color: { pattern: ["#343a40", "#4fc3f7", "#f62d51", "#2962FF", "#ced4da"] },
|
||||
data: {
|
||||
columns: [
|
||||
["option1", 750, 530, 400, 320, 200, 130],
|
||||
["option2", 250, 150, 200, 130, 10, -130],
|
||||
["option3", -150, -250, -200, -10, -50, -130]
|
||||
],
|
||||
type: "bar",
|
||||
groups: [
|
||||
["option1", "option2", "option3"]
|
||||
],
|
||||
order: "desc"
|
||||
},
|
||||
grid: { x: { show: !0 } }
|
||||
});
|
||||
setTimeout(function() {
|
||||
a.load({
|
||||
columns: [
|
||||
["option4", 1810, 1520, 1600, 1450, 1300, 1200]
|
||||
]
|
||||
})
|
||||
}, 1e3), setTimeout(function() {
|
||||
a.load({
|
||||
columns: [
|
||||
["option5", 800, 520, 600, 450, 300, 200]
|
||||
]
|
||||
})
|
||||
}, 2e3), setTimeout(function() {
|
||||
a.groups([
|
||||
["option1", "option2", "option3", "option4", "option5"]
|
||||
])
|
||||
}, 3e3)
|
||||
});
|
||||
25
dist/js/pages/c3-chart/data/c3-row-oriented.js
vendored
Normal file
25
dist/js/pages/c3-chart/data/c3-row-oriented.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/*************************************************************************************/
|
||||
// -->Template Name: Bootstrap Press Admin
|
||||
// -->Author: Themedesigner
|
||||
// -->Email: niravjoshi87@gmail.com
|
||||
// -->File: c3_chart_JS
|
||||
/*************************************************************************************/
|
||||
$(function() {
|
||||
var o = c3.generate({
|
||||
bindto: "#row-oriented",
|
||||
size: { height: 400 },
|
||||
color: { pattern: ["#2962FF", "#343a40", "#4fc3f7"] },
|
||||
data: {
|
||||
rows: [
|
||||
["option1", "option2", "option3"],
|
||||
[300, 120, 90],
|
||||
[240, 160, 40],
|
||||
[290, 200, 50],
|
||||
[230, 160, 120],
|
||||
[300, 130, 80],
|
||||
[320, 220, 90]
|
||||
]
|
||||
},
|
||||
grid: { y: { show: !0 } }
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user