# クラス: Chart<TType, TData, TLabel>
# 型パラメーター
| 名前 | 型 |
|---|---|
TType | extends ChartType = ChartType |
TData | DefaultDataPoint<TType> |
TLabel | unknown |
# コンストラクター
# constructor
• new Chart<TType, TData, TLabel>(item, config)
# 型パラメーター
| 名前 | 型 |
|---|---|
TType | extends keyof ChartTypeRegistry = keyof ChartTypeRegistry |
TData | DistributiveArray<ChartTypeRegistry[TType]["defaultDataPoint"]> |
TLabel | unknown |
# パラメーター
| 名前 | 型 |
|---|---|
item | ChartItem |
config | ChartConfiguration<TType, TData, TLabel> | ChartConfigurationCustomTypesPerDataset<TType, TData, TLabel> |
# 定義位置
types/index.d.ts:509 (新しいウィンドウで開きます)
# プロパティ
# aspectRatio
• Readonly aspectRatio: number
# 定義位置
types/index.d.ts:496 (新しいウィンドウで開きます)
# attached
• Readonly attached: boolean
# 定義位置
types/index.d.ts:501 (新しいウィンドウで開きます)
# boxes
• Readonly boxes: LayoutItem[]
# 定義位置
types/index.d.ts:497 (新しいウィンドウで開きます)
# canvas
• Readonly canvas: HTMLCanvasElement
# 定義位置
types/index.d.ts:491 (新しいウィンドウで開きます)
# chartArea
• Readonly chartArea: ChartArea
# 定義位置
types/index.d.ts:499 (新しいウィンドウで開きます)
# config
• Readonly config: ChartConfiguration<TType, TData, TLabel> | ChartConfigurationCustomTypesPerDataset<TType, TData, TLabel>
# 定義位置
types/index.d.ts:493 (新しいウィンドウで開きます)
# ctx
• Readonly ctx: CanvasRenderingContext2D
# 定義位置
types/index.d.ts:492 (新しいウィンドウで開きます)
# currentDevicePixelRatio
• Readonly currentDevicePixelRatio: number
# 定義位置
types/index.d.ts:498 (新しいウィンドウで開きます)
# data
• data: ChartData<TType, TData, TLabel>
# 定義位置
types/index.d.ts:506 (新しいウィンドウで開きます)
# height
• Readonly height: number
# 定義位置
types/index.d.ts:495 (新しいウィンドウで開きます)
# id
• Readonly id: string
# 定義位置
types/index.d.ts:490 (新しいウィンドウで開きます)
# legend
• Optional Readonly legend: LegendElement<TType>
# 定義位置
types/index.d.ts:503 (新しいウィンドウで開きます)
# オプション
• **options**: DeepPartial<CoreChartOptions<TType> & ElementChartOptions<TType> & PluginChartOptions<TType> & DatasetChartOptions<TType> & ScaleChartOptions<TType> & ChartTypeRegistry[TType]["chartOptions"]>
# 定義場所
types/index.d.ts:507 (新しいウィンドウで開きます)
# プラットフォーム
• Readonly **platform**: BasePlatform
# 定義場所
types/index.d.ts:489 (新しいウィンドウで開きます)
# スケール
• Readonly **scales**: Object
# インデックスシグネチャ
▪ [key: string]: Scale
# 定義場所
types/index.d.ts:500 (新しいウィンドウで開きます)
# ツールチップ
• Optional Readonly **tooltip**: TooltipModel<TType>
# 定義場所
types/index.d.ts:504 (新しいウィンドウで開きます)
# 幅
• Readonly **width**: number
# 定義場所
types/index.d.ts:494 (新しいウィンドウで開きます)
# デフォルト値
▪ Static Readonly **defaults**: Defaults
# 定義場所
types/index.d.ts:551 (新しいウィンドウで開きます)
# インスタンス
▪ Static Readonly **instances**: Object
# インデックスシグネチャ
▪ [key: string]: Chart
# 定義場所
types/index.d.ts:554 (新しいウィンドウで開きます)
# 上書き
▪ Static Readonly **overrides**: Overrides
# 定義場所
types/index.d.ts:552 (新しいウィンドウで開きます)
# レジストリ
▪ Static Readonly **registry**: Registry
# 定義場所
types/index.d.ts:555 (新しいウィンドウで開きます)
# バージョン
▪ Static Readonly **version**: string
# 定義場所
types/index.d.ts:553 (新しいウィンドウで開きます)
# メソッド
# bindEvents
▸ **bindEvents**(): void
# 戻り値
void
# 定義場所
types/index.d.ts:541 (新しいウィンドウで開きます)
# buildOrUpdateControllers
▸ **buildOrUpdateControllers**(): void
# 戻り値
void
# 定義場所
types/index.d.ts:517 (新しいウィンドウで開きます)
# buildOrUpdateScales
▸ **buildOrUpdateScales**(): void
# 戻り値
void
# 定義場所
types/index.d.ts:516 (新しいウィンドウで開きます)
# clear
▸ **clear**(): Chart<TType, TData, TLabel>
# 戻り値
Chart<TType, TData, TLabel>
# 定義場所
types/index.d.ts:511 (新しいウィンドウで開きます)
# destroy
▸ **destroy**(): void
# 戻り値
void
# 定義場所
types/index.d.ts:539 (新しいウィンドウで開きます)
# draw
▸ **draw**(): void
# 戻り値
void
# 定義場所
types/index.d.ts:521 (新しいウィンドウで開きます)
# ensureScalesHaveIDs
▸ **ensureScalesHaveIDs**(): void
# 戻り値
void
# 定義場所
types/index.d.ts:515 (新しいウィンドウで開きます)
# getActiveElements
▸ getActiveElements(): ActiveElement[]
# 戻り値
# 定義済み
types/index.d.ts:536 (新しいウィンドウで開きます)
# getContext
▸ getContext(): Object
# 戻り値
Object
| 名前 | 型 |
|---|---|
チャート | Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown> |
タイプ | 文字列 |
# 定義済み
types/index.d.ts:549 (新しいウィンドウで開きます)
# getDataVisibility
▸ getDataVisibility(index): boolean
# パラメータ
| 名前 | 型 |
|---|---|
index | 数値 |
# 戻り値
boolean
# 定義済み
types/index.d.ts:532 (新しいウィンドウで開きます)
# getDatasetMeta
▸ getDatasetMeta(datasetIndex): ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>
# パラメータ
| 名前 | 型 |
|---|---|
datasetIndex | 数値 |
# 戻り値
ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>
# 定義済み
types/index.d.ts:527 (新しいウィンドウで開きます)
# getElementsAtEventForMode
▸ getElementsAtEventForMode(e, mode, options, useFinalPosition): InteractionItem[]
# パラメータ
| 名前 | 型 |
|---|---|
e | イベント |
mode | 文字列 |
options | InteractionOptions |
useFinalPosition | boolean |
# 戻り値
# 定義済み
types/index.d.ts:524 (新しいウィンドウで開きます)
# getSortedVisibleDatasetMetas
▸ getSortedVisibleDatasetMetas(): ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>[]
# 戻り値
ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>[]
# 定義済み
types/index.d.ts:526 (新しいウィンドウで開きます)
# getVisibleDatasetCount
▸ getVisibleDatasetCount(): number
# 戻り値
数値
# 定義済み
types/index.d.ts:528 (新しいウィンドウで開きます)
# hide
▸ hide(datasetIndex, dataIndex?): void
# パラメータ
| 名前 | 型 |
|---|---|
datasetIndex | 数値 |
dataIndex? | 数値 |
# 戻り値
void
# 定義済み
types/index.d.ts:533 (新しいウィンドウで開きます)
# isDatasetVisible
▸ isDatasetVisible(datasetIndex): boolean
# パラメータ
| 名前 | 型 |
|---|---|
datasetIndex | 数値 |
# 戻り値
boolean
# 定義済み
types/index.d.ts:529 (新しいウィンドウで開きます)
# isPluginEnabled
▸ isPluginEnabled(pluginId): boolean
# パラメータ
| 名前 | 型 |
|---|---|
pluginId | 文字列 |
# 戻り値
boolean
# 定義済み
types/index.d.ts:547 (新しいウィンドウで開きます)
# isPointInArea
▸ isPointInArea(point): boolean
# パラメータ
| 名前 | 型 |
|---|---|
point | Point |
# 戻り値
boolean
# 定義済み
types/index.d.ts:523 (新しいウィンドウで開きます)
# notifyPlugins
▸ notifyPlugins(hook, args?): boolean | void
# パラメータ
| 名前 | 型 |
|---|---|
hook | 文字列 |
args? | AnyObject |
# 戻り値
boolean | void
# 定義済み
types/index.d.ts:545 (新しいウィンドウで開きます)
# render
▸ render(): void
# 戻り値
void
# 定義済み
types/index.d.ts:520 (新しいウィンドウで開きます)
# reset
▸ reset(): void
# 戻り値
void
# 定義済み
types/index.d.ts:518 (新しいウィンドウで開きます)
# resize
▸ resize(width?, height?): void
# パラメータ
| 名前 | 型 |
|---|---|
width? | 数値 |
height? | 数値 |
# 戻り値
void
# 定義済み
types/index.d.ts:514 (新しいウィンドウで開きます)
# setActiveElements
▸ setActiveElements(active): void
# パラメータ
| 名前 | 型 |
|---|---|
active | ActiveDataPoint[] |
# 戻り値
void
# 定義済み
types/index.d.ts:537 (新しいウィンドウで開きます)
# setDatasetVisibility
▸ setDatasetVisibility(datasetIndex, visible): void
# パラメータ
| 名前 | 型 |
|---|---|
datasetIndex | 数値 |
visible | boolean |
# 戻り値
void
# 定義済み
types/index.d.ts:530 (新しいウィンドウで開きます)
# show
▸ show(datasetIndex, dataIndex?): void
# パラメータ
| 名前 | 型 |
|---|---|
datasetIndex | 数値 |
dataIndex? | 数値 |
# 戻り値
void
# 定義済み
types/index.d.ts:534 (新しいウィンドウで開きます)
# stop
▸ stop(): Chart<TType, TData, TLabel>
# 戻り値
Chart<TType, TData, TLabel>
# 定義済み
types/index.d.ts:512 (新しいウィンドウで開きます)
# toBase64Image
▸ toBase64Image(type?, quality?): string
# パラメータ
| 名前 | 型 |
|---|---|
type? | 文字列 |
quality? | unknown |
# 戻り値
文字列
# 定義済み
types/index.d.ts:540 (新しいウィンドウで開きます)
# toggleDataVisibility
▸ toggleDataVisibility(index): void
# パラメータ
| 名前 | 型 |
|---|---|
index | 数値 |
# 戻り値
void
# 定義済み
types/index.d.ts:531 (新しいウィンドウで開きます)
# unbindEvents
▸ unbindEvents(): void
# 戻り値
void
# 定義済み
types/index.d.ts:542 (新しいウィンドウで開きます)
# update
▸ update(mode?): void
# パラメータ
| 名前 | 型 |
|---|---|
mode? | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | (ctx: { datasetIndex: number }) => "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" |
# 戻り値
void
# 定義済み
types/index.d.ts:519 (新しいウィンドウで開きます)
# updateHoverStyle
▸ updateHoverStyle(items, mode, enabled): void
# パラメータ
| 名前 | 型 |
|---|---|
items | InteractionItem[] |
mode | "dataset" |
enabled | boolean |
# 戻り値
void
# 定義済み
types/index.d.ts:543 (新しいウィンドウで開きます)
# getChart
▸ Static getChart(key): Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
# パラメータ
| 名前 | 型 |
|---|---|
key | string | HTMLCanvasElement | CanvasRenderingContext2D |
# 戻り値
Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
# 定義済み
types/index.d.ts:556 (新しいウィンドウで開きます)
# register
▸ Static register(...items): void
# パラメータ
| 名前 | 型 |
|---|---|
...items | ChartComponentLike[] |
# 戻り値
void
# 定義済み
types/index.d.ts:557 (新しいウィンドウで開きます)
# unregister
▸ Static unregister(...items): void
# パラメータ
| 名前 | 型 |
|---|---|
...items | ChartComponentLike[] |
# 戻り値
void