[MIN] build dist, updated rollup.config and index.html for new import
This commit is contained in:
parent
9469c892c3
commit
3fb714cc55
2
.gitignore
vendored
2
.gitignore
vendored
@ -59,3 +59,5 @@ typings/
|
|||||||
|
|
||||||
# next.js build output
|
# next.js build output
|
||||||
.next
|
.next
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
2
dist/frappe-charts.min.iife.js
vendored
2
dist/frappe-charts.min.iife.js
vendored
File diff suppressed because one or more lines are too long
2
dist/frappe-charts.min.iife.js.map
vendored
2
dist/frappe-charts.min.iife.js.map
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/frappe-charts.min.js
vendored
2
docs/assets/js/frappe-charts.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -86,7 +86,7 @@ let barCompositeData = {
|
|||||||
let c1 = document.querySelector("#chart-composite-1");
|
let c1 = document.querySelector("#chart-composite-1");
|
||||||
let c2 = document.querySelector("#chart-composite-2");
|
let c2 = document.querySelector("#chart-composite-2");
|
||||||
|
|
||||||
let lineCompositeChart = new Chart (c1, {
|
let lineCompositeChart = new frappe.Chart (c1, {
|
||||||
title: "Fireball/Bolide Events - Yearly (reported)",
|
title: "Fireball/Bolide Events - Yearly (reported)",
|
||||||
data: lineCompositeData,
|
data: lineCompositeData,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@ -102,7 +102,7 @@ let lineCompositeChart = new Chart (c1, {
|
|||||||
// regionFill: 1
|
// regionFill: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
let barCompositeChart = new Chart (c2, {
|
let barCompositeChart = new frappe.Chart (c2, {
|
||||||
data: barCompositeData,
|
data: barCompositeData,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
height: 190,
|
height: 190,
|
||||||
@ -168,7 +168,7 @@ let typeData = {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
// let typeChart = new Chart("#chart-types", {
|
// let typeChart = new frappe.Chart("#chart-types", {
|
||||||
// title: "My Awesome Chart",
|
// title: "My Awesome Chart",
|
||||||
// data: typeData,
|
// data: typeData,
|
||||||
// type: 'bar',
|
// type: 'bar',
|
||||||
@ -199,7 +199,7 @@ let args = {
|
|||||||
formatTooltipY: d => d + ' pts',
|
formatTooltipY: d => d + ' pts',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let aggrChart = new Chart("#chart-aggr", args);
|
let aggrChart = new frappe.Chart("#chart-aggr", args);
|
||||||
|
|
||||||
Array.prototype.slice.call(
|
Array.prototype.slice.call(
|
||||||
document.querySelectorAll('.aggr-type-buttons button')
|
document.querySelectorAll('.aggr-type-buttons button')
|
||||||
@ -209,7 +209,7 @@ Array.prototype.slice.call(
|
|||||||
let type = btn.getAttribute('data-type');
|
let type = btn.getAttribute('data-type');
|
||||||
args.type = type;
|
args.type = type;
|
||||||
|
|
||||||
let newChart = new Chart("#chart-aggr", args);;
|
let newChart = new frappe.Chart("#chart-aggr", args);;
|
||||||
if(newChart){
|
if(newChart){
|
||||||
aggrChart = newChart;
|
aggrChart = newChart;
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ let update_data = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
let update_chart = new Chart("#chart-update", {
|
let update_chart = new frappe.Chart("#chart-update", {
|
||||||
data: update_data,
|
data: update_data,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
height: 250,
|
height: 250,
|
||||||
@ -346,7 +346,7 @@ let plotChartArgs = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
new Chart("#chart-trends", plotChartArgs);
|
new frappe.Chart("#chart-trends", plotChartArgs);
|
||||||
|
|
||||||
Array.prototype.slice.call(
|
Array.prototype.slice.call(
|
||||||
document.querySelectorAll('.chart-plot-buttons button')
|
document.querySelectorAll('.chart-plot-buttons button')
|
||||||
@ -364,7 +364,7 @@ Array.prototype.slice.call(
|
|||||||
// plotChartArgs.init = false;
|
// plotChartArgs.init = false;
|
||||||
plotChartArgs.lineOptions = config;
|
plotChartArgs.lineOptions = config;
|
||||||
|
|
||||||
new Chart("#chart-trends", plotChartArgs);
|
new frappe.Chart("#chart-trends", plotChartArgs);
|
||||||
|
|
||||||
Array.prototype.slice.call(
|
Array.prototype.slice.call(
|
||||||
btn.parentNode.querySelectorAll('button')).map(el => {
|
btn.parentNode.querySelectorAll('button')).map(el => {
|
||||||
@ -415,7 +415,7 @@ let events_data = {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
let events_chart = new Chart("#chart-events", {
|
let events_chart = new frappe.Chart("#chart-events", {
|
||||||
title: "Jupiter's Moons: Semi-major Axis (1000 km)",
|
title: "Jupiter's Moons: Semi-major Axis (1000 km)",
|
||||||
data: events_data,
|
data: events_data,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@ -447,7 +447,7 @@ for (var i = 0; i< 375; i++) {
|
|||||||
timestamp = Math.floor(timestamp - 86400).toFixed(1);
|
timestamp = Math.floor(timestamp - 86400).toFixed(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
new Chart("#chart-heatmap", {
|
new frappe.Chart("#chart-heatmap", {
|
||||||
data: heatmapData,
|
data: heatmapData,
|
||||||
type: 'heatmap',
|
type: 'heatmap',
|
||||||
legendScale: [0, 1, 2, 4, 5],
|
legendScale: [0, 1, 2, 4, 5],
|
||||||
@ -476,7 +476,7 @@ Array.prototype.slice.call(
|
|||||||
colors = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001c'];
|
colors = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001c'];
|
||||||
}
|
}
|
||||||
|
|
||||||
new Chart("#chart-heatmap", {
|
new frappe.Chart("#chart-heatmap", {
|
||||||
data: heatmapData,
|
data: heatmapData,
|
||||||
type: 'heatmap',
|
type: 'heatmap',
|
||||||
legendScale: [0, 1, 2, 4, 5],
|
legendScale: [0, 1, 2, 4, 5],
|
||||||
@ -514,7 +514,7 @@ Array.prototype.slice.call(
|
|||||||
discreteDomains = 0;
|
discreteDomains = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
new Chart("#chart-heatmap", {
|
new frappe.Chart("#chart-heatmap", {
|
||||||
data: heatmapData,
|
data: heatmapData,
|
||||||
type: 'heatmap',
|
type: 'heatmap',
|
||||||
legendScale: [0, 1, 2, 4, 5],
|
legendScale: [0, 1, 2, 4, 5],
|
||||||
|
|||||||
@ -287,9 +287,9 @@
|
|||||||
<p class="step-explain">Install via npm</p>
|
<p class="step-explain">Install via npm</p>
|
||||||
<pre><code class="hljs console"> npm install frappe-charts</code></pre>
|
<pre><code class="hljs console"> npm install frappe-charts</code></pre>
|
||||||
<p class="step-explain">And include it in your project</p>
|
<p class="step-explain">And include it in your project</p>
|
||||||
<pre><code class="hljs javascript"> import Chart from "frappe-charts/dist/frappe-charts.min.esm"</code></pre>
|
<pre><code class="hljs javascript"> import { Chart } from "frappe-charts"</code></pre>
|
||||||
<p class="step-explain">... or include it directly in your HTML</p>
|
<p class="step-explain">... or include it directly in your HTML</p>
|
||||||
<pre><code class="hljs html"> <script src="https://unpkg.com/frappe-charts@0.0.8/dist/frappe-charts.min.iife.js"></script></code></pre>
|
<pre><code class="hljs html"> <script src="https://unpkg.com/frappe-charts@1.0.0"></script></code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export default [
|
|||||||
format: 'iife',
|
format: 'iife',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
name: 'Chart',
|
name: 'frappe',
|
||||||
plugins: [
|
plugins: [
|
||||||
postcss({
|
postcss({
|
||||||
preprocessor: (content, id) => new Promise((resolve, reject) => {
|
preprocessor: (content, id) => new Promise((resolve, reject) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user