Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade benchmark to Chart.js 3.0.0-alpha.2 #277

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions bench/Chart.js-next.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
<body>
<h2 id="wait">Loading lib....</h2>

<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://www.chartjs.org/samples/next/utils.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chartjs-adapter-date-fns.bundle.min.js"></script>

<div class="chart-container">
<canvas id="chart1"></canvas>
Expand Down Expand Up @@ -63,13 +61,12 @@ <h2 id="wait">Loading lib....</h2>
console.time('chart');

var ctx = document.getElementById('chart1').getContext('2d');
var color = Chart.helpers.color;
var cfg = {
data: {
datasets: [
{
label: 'CPU',
borderColor: window.chartColors.red,
borderColor: 'rgb(255, 99, 132)',
data: data[0],
type: 'line',
pointRadius: 0,
Expand All @@ -79,7 +76,7 @@ <h2 id="wait">Loading lib....</h2>
},
{
label: 'RAM',
borderColor: window.chartColors.blue,
borderColor: 'rgb(54, 162, 235)',
data: data[1],
type: 'line',
pointRadius: 0,
Expand All @@ -89,7 +86,7 @@ <h2 id="wait">Loading lib....</h2>
},
{
label: 'TCP Out',
borderColor: window.chartColors.green,
borderColor: 'rgb(75, 192, 192)',
data: data[2],
type: 'line',
pointRadius: 0,
Expand All @@ -103,6 +100,7 @@ <h2 id="wait">Loading lib....</h2>
animation: false,
maintainAspectRatio: false,
parsing: false,
normalized: true,
tooltips: {
mode: 'index',
intersect: false
Expand All @@ -113,8 +111,7 @@ <h2 id="wait">Loading lib....</h2>
},
scales: {
x: {
type: 'time',
distribution: 'series',
type: 'timeseries',
ticks: {
source: 'auto',
maxRotation: 0,
Expand Down