]> git.proxmox.com Git - extjs.git/blame - extjs/examples/kitchensink/classic/samples/view/charts/line/Spline.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / charts / line / Spline.js
CommitLineData
6527f429
DM
1/**\r
2 * A spline chart is a specialized form of conventional line and area charts. Unlike\r
3 * conventional charts which connect data points with straight lines, a spline draws a\r
4 * fitted curve through the data points. They are used specifically for plotting data that\r
5 * requires the use of curve fittings e.g. impulse-response, product life cycle etc.\r
6 */\r
7Ext.define('KitchenSink.view.charts.line.Spline', {\r
8 extend: 'Ext.Panel',\r
9 xtype: 'line-spline',\r
10 controller: 'line-spline',\r
11\r
12 // <example>\r
13 // Content between example tags is omitted from code preview.\r
14 bodyStyle: 'background: transparent !important',\r
15 layout: {\r
16 type: 'vbox',\r
17 pack: 'center'\r
18 },\r
19 otherContent: [{\r
20 type: 'Controller',\r
21 path: 'classic/samples/view/charts/line/SplineController.js'\r
22 }, {\r
23 type: 'Store',\r
24 path: 'classic/samples/store/Spline.js'\r
25 }],\r
26 // </example>\r
27 width: 650,\r
28\r
29 tbar: [\r
30 '->',\r
31 {\r
32 text: 'Preview',\r
33 handler: 'onPreview'\r
34 }\r
35 ],\r
36\r
37 items: {\r
38 xtype: 'cartesian',\r
39 reference: 'chart',\r
40 width: '100%',\r
41 height: 500,\r
42 store: {\r
43 type: 'spline'\r
44 },\r
45 insetPadding: {\r
46 top: 40,\r
47 left: 20,\r
48 right: 40,\r
49 bottom: 20\r
50 },\r
51 sprites: [{\r
52 type: 'text',\r
53 text: 'Line Charts - Spline',\r
54 fontSize: 22,\r
55 width: 100,\r
56 height: 30,\r
57 x: 40, // the sprite x position\r
58 y: 20 // the sprite y position\r
59 }],\r
60 axes: [{\r
61 type: 'numeric',\r
62 position: 'left',\r
63 title: 'Sin (Theta)',\r
64 grid: true,\r
65 fields: 'sin',\r
66 label: {\r
67 renderer: 'onAxisLabelRender'\r
68 }\r
69 }, {\r
70 type: 'numeric',\r
71 position: 'bottom',\r
72 title: 'Theta',\r
73 grid: true,\r
74 fields: 'theta',\r
75 label: {\r
76 textPadding: 0,\r
77 rotate: {\r
78 degrees: -45\r
79 }\r
80 }\r
81 }],\r
82 series: [{\r
83 type: 'line',\r
84 xField: 'theta',\r
85 yField: 'sin',\r
86 smooth: true,\r
87 highlight: true,\r
88 showMarkers: false\r
89 }]\r
90 }\r
91});\r