瀏覽代碼

[MIN] build dist, updated rollup.config and index.html for new import

tags/1.2.0
Achilles Rasquinha 7 年之前
父節點
當前提交
3fb714cc55
共有 8 個檔案被更改,包括 22 行新增20 行删除
  1. +3
    -1
      .gitignore
  2. +1
    -1
      dist/frappe-charts.min.iife.js
  3. +1
    -1
      dist/frappe-charts.min.iife.js.map
  4. +1
    -1
      docs/assets/js/frappe-charts.min.js
  5. +1
    -1
      docs/assets/js/frappe-charts.min.js.map
  6. +12
    -12
      docs/assets/js/index.js
  7. +2
    -2
      docs/index.html
  8. +1
    -1
      rollup.config.js

+ 3
- 1
.gitignore 查看文件

@@ -58,4 +58,6 @@ typings/
.env .env


# next.js build output # next.js build output
.next
.next

.DS_Store

+ 1
- 1
dist/frappe-charts.min.iife.js
文件差異過大導致無法顯示
查看文件


+ 1
- 1
dist/frappe-charts.min.iife.js.map
文件差異過大導致無法顯示
查看文件


+ 1
- 1
docs/assets/js/frappe-charts.min.js
文件差異過大導致無法顯示
查看文件


+ 1
- 1
docs/assets/js/frappe-charts.min.js.map
文件差異過大導致無法顯示
查看文件


+ 12
- 12
docs/assets/js/index.js 查看文件

@@ -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],


+ 2
- 2
docs/index.html 查看文件

@@ -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"> &lt;script src="https://unpkg.com/frappe-charts@0.0.8/dist/frappe-charts.min.iife.js"&gt;&lt;/script&gt;</code></pre>
<pre><code class="hljs html"> &lt;script src="https://unpkg.com/frappe-charts@1.0.0"&gt;&lt;/script&gt;</code></pre>


</div> </div>
</div> </div>


+ 1
- 1
rollup.config.js 查看文件

@@ -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…
取消
儲存