-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathoptions.html
73 lines (73 loc) · 36.7 KB
/
options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Options | Chart.js</title>
<meta name="generator" content="VuePress 1.8.2">
<link rel="icon" href="/docs/3.0.0/favicon.ico">
<meta name="description" content="Open source HTML5 Charts for your website">
<link rel="preload" href="/docs/3.0.0/assets/css/0.styles.d1176108.css" as="style"><link rel="preload" href="/docs/3.0.0/assets/js/app.87478e1f.js" as="script"><link rel="preload" href="/docs/3.0.0/assets/js/2.dd802d82.js" as="script"><link rel="preload" href="/docs/3.0.0/assets/js/164.436715ca.js" as="script"><link rel="prefetch" href="/docs/3.0.0/assets/js/10.d01f0a05.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/100.8bb5059e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/101.f681b5de.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/102.7c60c881.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/103.6d187d49.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/104.583cd3e4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/105.e79e58ce.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/106.c92ae374.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/107.b2bf9c1b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/108.ea12fbad.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/109.0b0705bf.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/11.2ccbcb48.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/110.9144a3d3.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/111.8be080f2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/112.b52257ac.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/113.ef33a81a.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/114.2793892a.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/115.22898eac.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/116.edc0b418.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/117.ec81c5df.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/118.a9482749.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/119.d992fb6c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/12.93cd1b39.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/120.bcc2d82b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/121.23c459ba.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/122.4b8743e0.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/123.d25f3581.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/124.6fc66155.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/125.c7f25348.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/126.3af8cb08.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/127.37247a55.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/128.d2845b32.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/129.a2c2339e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/13.734ca356.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/130.aa3a36f7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/131.568490f2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/132.ce76c2c9.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/133.9d1851bc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/134.4bb15ab4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/135.cd052bad.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/136.05093feb.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/137.4a1e5a1e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/138.049705ce.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/139.14e1e4c3.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/14.35314a11.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/140.841e10b0.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/141.620c94f4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/142.5cb7bf1b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/143.9cddfe48.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/144.233f78f7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/145.3afec4a9.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/146.66cb642f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/147.17327d91.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/148.3be9d903.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/149.c75a37a2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/15.9aefc0c3.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/150.c189ec6d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/151.9c6ea260.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/152.a59ec2ec.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/153.10d0a18a.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/154.6b6ef6b6.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/155.2f256baf.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/156.b8071ed8.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/157.0f57a4d3.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/158.b9d0d5d5.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/159.f2484d25.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/16.64b6d2eb.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/160.817b222e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/161.7269684a.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/162.f70e2a5d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/163.70e1070c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/165.fdefbe0b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/166.4bdd63b6.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/167.d684ed9e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/168.d51ebf8b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/169.84a247ae.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/17.25dfb77b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/170.8ae4ef58.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/171.7649256c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/172.e981cef5.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/173.5d7e7bdc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/174.f80a1e41.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/175.4f0d4dac.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/176.38a131fd.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/177.1b9dfa07.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/178.4a9458c4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/179.308ac48d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/18.b56d41e6.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/180.27456121.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/181.837cdcfa.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/182.44cddd93.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/183.93ea0f45.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/184.652d4843.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/185.fc6c1aa0.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/186.cbf8d00e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/187.cb827dda.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/188.5f593853.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/189.e68b9a3c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/19.0664775c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/190.5478e841.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/191.280541a7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/192.e4ce8046.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/193.fca6c804.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/194.3f8325b6.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/195.2581e093.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/196.40e94117.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/197.e4d2ec76.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/198.e187cafc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/199.e72ad8e2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/20.b07b85d2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/200.9f688d39.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/201.53f56bef.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/202.1ecd9db5.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/203.6382340b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/204.6a493222.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/205.64b4513f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/206.22a3561b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/207.7b4492b5.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/208.e955204f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/209.66e4c8bc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/21.62455258.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/210.d5c2ce9f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/211.340125bc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/212.0d974df1.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/213.6be454f1.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/214.00a96414.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/215.165febd4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/216.e2373709.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/217.8d9c933f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/218.f702e523.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/219.afe09817.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/22.a80f38ed.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/220.d4fbb5d9.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/221.38cadb35.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/222.7d61d4dd.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/223.7e700c5d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/224.b01cf536.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/225.6332be4d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/226.84b66426.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/227.f6f8b624.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/228.31ea0ecd.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/229.226e2b35.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/23.30332d07.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/230.866b4908.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/231.df387d6e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/232.d5517980.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/233.0de7effe.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/24.20dfafb4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/25.5472c348.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/26.01ab6ff7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/27.d7f8172e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/28.8af997b2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/29.b81e384a.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/3.f4a41186.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/30.cc83f946.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/31.040079cf.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/32.0e03105f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/33.2ef3c128.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/34.6a986e3c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/35.cf2a4584.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/36.3aee8bf7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/37.40323a8f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/38.f807f1a8.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/39.d63e27c3.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/4.a58331ff.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/40.bca88b33.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/41.e4dc5f6e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/42.2a86c317.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/43.da48086d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/44.ea105be0.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/45.6a79d633.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/46.48e520ce.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/47.3e57fe8d.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/48.c36b6a8b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/49.60a2e16e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/5.2aba828f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/50.fcf2840b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/51.aa85f5c4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/52.0484b1ef.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/53.e0b9261c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/54.f8d448e7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/55.138b03d9.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/56.f37190f6.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/57.6cd2cece.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/58.24e456a1.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/59.a034bcab.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/6.ca579472.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/60.f3e00438.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/61.ed232ddc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/62.83b1bceb.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/63.8f0d32a2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/64.4ecf4708.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/65.5a14266e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/66.ce25f6cd.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/67.94b9e7cf.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/68.bfea2c60.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/69.1f5027ad.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/7.b7419fba.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/70.395453c7.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/71.ddda92e2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/72.f68f0f53.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/73.2c72ec28.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/74.8533c7f4.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/75.1c3c3529.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/76.bfde264e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/77.f1b0cdbe.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/78.ef1ca4ad.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/79.56736467.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/8.8447ddee.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/80.64e7d95f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/81.04133b46.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/82.0bf43bbc.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/83.7b62729b.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/84.2f68ea1c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/85.f06f6b6c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/86.c75f4dbf.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/87.97cde5fb.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/88.11c959b5.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/89.f449ef8f.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/9.a58f1814.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/90.ca0ae310.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/91.3dc67ff5.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/92.09c05bad.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/93.d2fc5e2c.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/94.d0288402.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/95.e1854ee3.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/96.43c3843e.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/97.2bf608c0.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/98.11c3efa2.js"><link rel="prefetch" href="/docs/3.0.0/assets/js/99.aa674669.js">
<link rel="stylesheet" href="/docs/3.0.0/assets/css/0.styles.d1176108.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/docs/3.0.0/" class="home-link router-link-active"><img src="/docs/3.0.0/favicon.ico" alt="Chart.js" class="logo"> <span class="site-name can-hide">Chart.js</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/docs/3.0.0/" class="nav-link">
Home
</a></div><div class="nav-item"><a href="/docs/3.0.0/api/" class="nav-link">
API
</a></div><div class="nav-item"><a href="/docs/3.0.0/samples/" class="nav-link">
Samples
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Community Menu" class="dropdown-title"><span class="title">Ecosystem</span> <span class="arrow down"></span></button> <button type="button" aria-label="Community Menu" class="mobile-dropdown-title"><span class="title">Ecosystem</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/chartjs/awesome" target="_blank" rel="noopener noreferrer" class="nav-link external">
Awesome
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://chartjs-slack.herokuapp.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Slack
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://stackoverflow.com/questions/tagged/chart.js" target="_blank" rel="noopener noreferrer" class="nav-link external">
Stack Overflow
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <a href="https://github.com/chartjs/Chart.js" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/docs/3.0.0/" class="nav-link">
Home
</a></div><div class="nav-item"><a href="/docs/3.0.0/api/" class="nav-link">
API
</a></div><div class="nav-item"><a href="/docs/3.0.0/samples/" class="nav-link">
Samples
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Community Menu" class="dropdown-title"><span class="title">Ecosystem</span> <span class="arrow down"></span></button> <button type="button" aria-label="Community Menu" class="mobile-dropdown-title"><span class="title">Ecosystem</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/chartjs/awesome" target="_blank" rel="noopener noreferrer" class="nav-link external">
Awesome
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://chartjs-slack.herokuapp.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Slack
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://stackoverflow.com/questions/tagged/chart.js" target="_blank" rel="noopener noreferrer" class="nav-link external">
Stack Overflow
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <a href="https://github.com/chartjs/Chart.js" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <ul class="sidebar-links"><li><a href="/docs/3.0.0/" aria-current="page" class="sidebar-link">Chart.js</a></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Getting Started</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>General</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/docs/3.0.0/general/data-structures.html" class="sidebar-link">Data structures</a></li><li><a href="/docs/3.0.0/general/accessibility.html" class="sidebar-link">Accessibility</a></li><li><a href="/docs/3.0.0/general/options.html" aria-current="page" class="active sidebar-link">Options</a></li><li><a href="/docs/3.0.0/general/colors.html" class="sidebar-link">Colors</a></li><li><a href="/docs/3.0.0/general/fonts.html" class="sidebar-link">Fonts</a></li><li><a href="/docs/3.0.0/general/padding.html" class="sidebar-link">Padding</a></li><li><a href="/docs/3.0.0/general/performance.html" class="sidebar-link">Performance</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Configuration</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Chart Types</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Axes</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Developers</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="options"><a href="#options" class="header-anchor">#</a> Options</h1> <h2 id="option-resolution"><a href="#option-resolution" class="header-anchor">#</a> Option resolution</h2> <p>Options are resolved from top to bottom, using a context dependent route.</p> <h3 id="chart-level-options"><a href="#chart-level-options" class="header-anchor">#</a> Chart level options</h3> <ul><li>options</li> <li>overrides[<code>config.type</code>]</li> <li>defaults</li></ul> <h3 id="dataset-level-options"><a href="#dataset-level-options" class="header-anchor">#</a> Dataset level options</h3> <p><code>dataset.type</code> defaults to <code>config.type</code>, if not specified.</p> <ul><li>dataset</li> <li>options.datasets[<code>dataset.type</code>]</li> <li>options</li> <li>overrides[<code>config.type</code>].datasets[<code>dataset.type</code>]</li> <li>defaults.datasets[<code>dataset.type</code>]</li> <li>defaults</li></ul> <h3 id="dataset-animation-options"><a href="#dataset-animation-options" class="header-anchor">#</a> Dataset animation options</h3> <ul><li>dataset.animation</li> <li>options.datasets[<code>dataset.type</code>].animation</li> <li>options.animation</li> <li>overrides[<code>config.type</code>].datasets[<code>dataset.type</code>].animation</li> <li>defaults.datasets[<code>dataset.type</code>].animation</li> <li>defaults.animation</li></ul> <h3 id="dataset-element-level-options"><a href="#dataset-element-level-options" class="header-anchor">#</a> Dataset element level options</h3> <p>Each scope is looked up with <code>elementType</code> prefix in the option name first, then wihtout the prefix. For example, <code>radius</code> for <code>point</code> element is looked up using <code>pointRadius</code> and if that does not hit, then <code>radius</code>.</p> <ul><li>dataset</li> <li>options.datasets[<code>dataset.type</code>]</li> <li>options.datasets[<code>dataset.type</code>].elements[<code>elementType</code>]</li> <li>options.elements[<code>elementType</code>]</li> <li>options</li> <li>overrides[<code>config.type</code>].datasets[<code>dataset.type</code>]</li> <li>overrides[<code>config.type</code>].datasets[<code>dataset.type</code>].elements[<code>elementType</code>]</li> <li>defaults.datasets[<code>dataset.type</code>]</li> <li>defaults.datasets[<code>dataset.type</code>].elements[<code>elementType</code>]</li> <li>defaults.elements[<code>elementType</code>]</li> <li>defaults</li></ul> <h3 id="scale-options"><a href="#scale-options" class="header-anchor">#</a> Scale options</h3> <ul><li>options.scales</li> <li>overrides[<code>config.type</code>].scales</li> <li>defaults.scales</li> <li>defaults.scale</li></ul> <h3 id="plugin-options"><a href="#plugin-options" class="header-anchor">#</a> Plugin options</h3> <p>A plugin can provide <code>additionalOptionScopes</code> array of paths to additionally look for its options in. For root scope, use empty string: <code>''</code>. Most core plugins also take options from root scope.</p> <ul><li>options.plugins[<code>plugin.id</code>]</li> <li>(options.[<code>...plugin.additionalOptionScopes</code>])</li> <li>overrides[<code>config.type</code>].plugins[<code>plugin.id</code>]</li> <li>defaults.plugins[<code>plugin.id</code>]</li> <li>(defaults.[<code>...plugin.additionalOptionScopes</code>])</li></ul> <h2 id="scriptable-options"><a href="#scriptable-options" class="header-anchor">#</a> Scriptable Options</h2> <p>Scriptable options also accept a function which is called for each of the underlying data values and that takes the unique argument <code>context</code> representing contextual information (see <a href="/docs/3.0.0/general/options.html#option-context">option context</a>).
A resolver is passed as second parameter, that can be used to access other options in the same context.</p> <div class="custom-block tip"><p class="custom-block-title">Note</p> <p>The <code>context</code> argument should be validated in the scriptable function, because the function can be invoked in different contexts. The <code>type</code> field is a good candidate for this validation.</p></div> <p>Example:</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token function-variable function">color</span><span class="token operator">:</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">context</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">var</span> index <span class="token operator">=</span> context<span class="token punctuation">.</span>dataIndex<span class="token punctuation">;</span>
<span class="token keyword">var</span> value <span class="token operator">=</span> context<span class="token punctuation">.</span>dataset<span class="token punctuation">.</span>data<span class="token punctuation">[</span>index<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token keyword">return</span> value <span class="token operator"><</span> <span class="token number">0</span> <span class="token operator">?</span> <span class="token string">'red'</span> <span class="token operator">:</span> <span class="token comment">// draw negative values in red</span>
index <span class="token operator">%</span> <span class="token number">2</span> <span class="token operator">?</span> <span class="token string">'blue'</span> <span class="token operator">:</span> <span class="token comment">// else, alternate values in blue and green</span>
<span class="token string">'green'</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token function-variable function">borderColor</span><span class="token operator">:</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">context<span class="token punctuation">,</span> options</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">var</span> color <span class="token operator">=</span> options<span class="token punctuation">.</span>color<span class="token punctuation">;</span> <span class="token comment">// resolve the value of another scriptable option: 'red', 'blue' or 'green'</span>
<span class="token keyword">return</span> Chart<span class="token punctuation">.</span>helpers<span class="token punctuation">.</span><span class="token function">color</span><span class="token punctuation">(</span>color<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">lighten</span><span class="token punctuation">(</span><span class="token number">0.2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="indexable-options"><a href="#indexable-options" class="header-anchor">#</a> Indexable Options</h2> <p>Indexable options also accept an array in which each item corresponds to the element at the same index. Note that if there are less items than data, the items are looped over. In many cases, using a <a href="#scriptable-options">function</a> is more appropriate if supported.</p> <p>Example:</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code>color<span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token string">'red'</span><span class="token punctuation">,</span> <span class="token comment">// color for data at index 0</span>
<span class="token string">'blue'</span><span class="token punctuation">,</span> <span class="token comment">// color for data at index 1</span>
<span class="token string">'green'</span><span class="token punctuation">,</span> <span class="token comment">// color for data at index 2</span>
<span class="token string">'black'</span><span class="token punctuation">,</span> <span class="token comment">// color for data at index 3</span>
<span class="token comment">//...</span>
<span class="token punctuation">]</span>
</code></pre></div><h2 id="option-context"><a href="#option-context" class="header-anchor">#</a> Option Context</h2> <p>The option context is used to give contextual information when resolving options and currently only applies to <a href="#scriptable-options">scriptable options</a>.
The object is preserved, so it can be used to store and pass information between calls.</p> <p>There are multiple levels of context objects:</p> <ul><li><code>chart</code> <ul><li><code>dataset</code> <ul><li><code>data</code></li></ul></li> <li><code>scale</code> <ul><li><code>tick</code></li></ul></li> <li><code>tooltip</code></li></ul></li></ul> <p>Each level inherits its parent(s) and any contextual information stored in the parent is available through the child.</p> <p>The context object contains the following properties:</p> <h3 id="chart"><a href="#chart" class="header-anchor">#</a> chart</h3> <ul><li><code>chart</code>: the associated chart</li> <li><code>type</code>: <code>'chart'</code></li></ul> <h3 id="dataset"><a href="#dataset" class="header-anchor">#</a> dataset</h3> <p>In addition to <a href="#chart">chart</a></p> <ul><li><code>active</code>: true if element is active (hovered)</li> <li><code>dataset</code>: dataset at index <code>datasetIndex</code></li> <li><code>datasetIndex</code>: index of the current dataset</li> <li><code>index</code>: same as <code>datasetIndex</code></li> <li><code>mode</code>: the update mode</li> <li><code>type</code>: <code>'dataset'</code></li></ul> <h3 id="data"><a href="#data" class="header-anchor">#</a> data</h3> <p>In addition to <a href="#dataset">dataset</a></p> <ul><li><code>active</code>: true if element is active (hovered)</li> <li><code>dataIndex</code>: index of the current data</li> <li><code>parsed</code>: the parsed data values for the given <code>dataIndex</code> and <code>datasetIndex</code></li> <li><code>raw</code>: the raw data values for the given <code>dataIndex</code> and <code>datasetIndex</code></li> <li><code>element</code>: the element (point, arc, bar, etc.) for this data</li> <li><code>index</code>: same as <code>dataIndex</code></li> <li><code>type</code>: <code>'data'</code></li></ul> <h3 id="scale"><a href="#scale" class="header-anchor">#</a> scale</h3> <p>In addition to <a href="#chart">chart</a></p> <ul><li><code>scale</code>: the associated scale</li> <li><code>type</code>: <code>'scale'</code></li></ul> <h3 id="tick"><a href="#tick" class="header-anchor">#</a> tick</h3> <p>In addition to <a href="#scale">scale</a></p> <ul><li><code>tick</code>: the associated tick object</li> <li><code>index</code>: tick index</li> <li><code>type</code>: <code>'tick'</code></li></ul> <h3 id="tooltip"><a href="#tooltip" class="header-anchor">#</a> tooltip</h3> <p>In addition to <a href="#chart">chart</a></p> <ul><li><code>tooltip</code>: the tooltip object</li> <li><code>tooltipItems</code>: the items the tooltip is displaying</li></ul></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">Last Updated:</span> <span class="time">3/30/2021, 6:19:45 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
←
<a href="/docs/3.0.0/general/accessibility.html" class="prev">
Accessibility
</a></span> <span class="next"><a href="/docs/3.0.0/general/colors.html">
Colors
</a>
→
</span></p></div> </main></div><div class="global-ui"></div></div>
<script src="/docs/3.0.0/assets/js/app.87478e1f.js" defer></script><script src="/docs/3.0.0/assets/js/2.dd802d82.js" defer></script><script src="/docs/3.0.0/assets/js/164.436715ca.js" defer></script>
</body>
</html>