From 47c7a42aaee3a007bb739703c5207cb3b7aa4752 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 26 Jan 2020 12:35:53 -0800 Subject: [PATCH] Improved financial sample (#6998) * Improved financial sample * Switch from adapter to moment * Use data instead of cached timestamps --- samples/advanced/financial.html | 251 +++++++++++++++++++++++++++++ samples/samples.js | 6 +- samples/scales/time/financial.html | 203 ----------------------- 3 files changed, 254 insertions(+), 206 deletions(-) create mode 100644 samples/advanced/financial.html delete mode 100644 samples/scales/time/financial.html diff --git a/samples/advanced/financial.html b/samples/advanced/financial.html new file mode 100644 index 00000000000..64a42655895 --- /dev/null +++ b/samples/advanced/financial.html @@ -0,0 +1,251 @@ + + + + + Line Chart + + + + + + + +
+

This example demonstrates a time series scale with custom logic for generating minor and major ticks. Major ticks are bolded

+

For more specific functionality for financial charts, please see chartjs-chart-financial

+ +
+
+
+ Chart Type: + + + + + + + diff --git a/samples/samples.js b/samples/samples.js index 518b7696c5c..b93cc773e56 100644 --- a/samples/samples.js +++ b/samples/samples.js @@ -124,9 +124,6 @@ }, { title: 'Line (break on 2 day gap)', path: 'scales/time/line-max-span.html' - }, { - title: 'Time Series', - path: 'scales/time/financial.html' }, { title: 'Combo', path: 'scales/time/combo.html' @@ -242,6 +239,9 @@ }, { title: 'Advanced', items: [{ + title: 'Custom minor and major ticks', + path: 'advanced/financial.html' + }, { title: 'Progress bar', path: 'advanced/progress-bar.html' }, { diff --git a/samples/scales/time/financial.html b/samples/scales/time/financial.html deleted file mode 100644 index 70246820caf..00000000000 --- a/samples/scales/time/financial.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - Line Chart - - - - - - - -
-

This example demonstrates a time series scale by drawing a financial line chart using just the core library. For more specific functionality for financial charts, please see chartjs-chart-financial

- -
-
-
- Chart Type: - - - - - - -