diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-22 05:36:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-22 05:36:48 +0900 |
| commit | 4e4c559db6964cbf17fcadf38d55fc79c995ca42 (patch) | |
| tree | 0e136ef1bf75c201b5805e667129082db3abcb61 /src/client/scripts | |
| parent | リモートノートで意図せずローカルカスタム絵文字が使... (diff) | |
| download | sharkey-4e4c559db6964cbf17fcadf38d55fc79c995ca42.tar.gz sharkey-4e4c559db6964cbf17fcadf38d55fc79c995ca42.tar.bz2 sharkey-4e4c559db6964cbf17fcadf38d55fc79c995ca42.zip | |
Migrate to Chart.js v3 (#7896)
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* 定期的にresync
* Update overview.vue
* wip
* wip
Diffstat (limited to 'src/client/scripts')
| -rw-r--r-- | src/client/scripts/hpml/lib.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/scripts/hpml/lib.ts b/src/client/scripts/hpml/lib.ts index 150a04732f..200faf820b 100644 --- a/src/client/scripts/hpml/lib.ts +++ b/src/client/scripts/hpml/lib.ts @@ -1,11 +1,11 @@ import * as tinycolor from 'tinycolor2'; -import Chart from 'chart.js'; import { Hpml } from './evaluator'; import { values, utils } from '@syuilo/aiscript'; import { Fn, HpmlScope } from '.'; import { Expr } from './expr'; import * as seedrandom from 'seedrandom'; +/* // https://stackoverflow.com/questions/38493564/chart-area-background-color-chartjs Chart.pluginService.register({ beforeDraw: (chart, easing) => { @@ -18,6 +18,7 @@ Chart.pluginService.register({ } } }); +*/ export function initAiLib(hpml: Hpml) { return { @@ -49,11 +50,12 @@ export function initAiLib(hpml: Hpml) { ])); }), 'MkPages:chart': values.FN_NATIVE(([id, opts]) => { + /* TODO utils.assertString(id); utils.assertObject(opts); const canvas = hpml.canvases[id.value]; const color = getComputedStyle(document.documentElement).getPropertyValue('--accent'); - Chart.defaults.global.defaultFontColor = '#555'; + Chart.defaults.color = '#555'; const chart = new Chart(canvas, { type: opts.value.get('type').value, data: { @@ -122,6 +124,7 @@ export function initAiLib(hpml: Hpml) { }) } }); + */ }) }; } |