]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/line/MarkedSpline.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / line / MarkedSpline.js
CommitLineData
6527f429
DM
1/**\r
2 * Marked splines are multi-series splines displaying smooth curves across multiple\r
3 * categories. Markers are placed at each connected point to clearly depict their position.\r
4 */\r
5Ext.define('KitchenSink.view.charts.line.MarkedSpline', {\r
6 extend: 'Ext.Panel',\r
7 xtype: 'line-marked-spline',\r
8 controller: 'line-marked-spline',\r
9\r
10 // <example>\r
11 // Content between example tags is omitted from code preview.\r
12 bodyStyle: 'background: transparent !important',\r
13 layout: {\r
14 type: 'vbox',\r
15 pack: 'center'\r
16 },\r
17 otherContent: [{\r
18 type: 'Controller',\r
19 path: 'classic/samples/view/charts/line/MarkedSplineController.js'\r
20 }, {\r
21 type: 'Store',\r
22 path: 'classic/samples/store/Spline.js'\r
23 }],\r
24 // </example>\r
25 width: 650,\r
26\r
27 tbar: [\r
28 '->',\r
29 {\r
30 text: 'Preview',\r
31 handler: 'onPreview'\r
32 }\r
33 ],\r
34\r
35 items: [{\r
36 xtype: 'cartesian',\r
37 reference: 'chart',\r
38 width: '100%',\r
39 height: 500,\r
40 store: {\r
41 type: 'spline'\r
42 },\r
43 insetPadding: {\r
44 top: 40,\r
45 right: 40,\r
46 bottom: 20,\r
47 left: 20\r
48 },\r
49 legend: {\r
50 docked: 'right'\r
51 },\r
52 sprites: [{\r
53 type: 'text',\r
54 text: 'Line Charts - Marked Spline',\r
55 fontSize: 22,\r
56 width: 100,\r
57 height: 30,\r
58 x: 40, // the sprite x position\r
59 y: 20 // the sprite y position\r
60 }],\r
61 axes: [{\r
62 type: 'numeric',\r
63 fields: ['sin', 'cos', 'tan' ],\r
64 position: 'left',\r
65 grid: true,\r
66 renderer: 'onAxisLabelRender'\r
67 }, {\r
68 type: 'category',\r
69 title: 'Theta',\r
70 fields: 'theta',\r
71 position: 'bottom',\r
72 style: {\r
73 textPadding: 0 // remove extra padding between labels to make sure no labels are skipped\r
74 },\r
75 grid: true,\r
76 label: {\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 style: {\r
88 lineWidth: 4\r
89 },\r
90 marker: {\r
91 radius: 4\r
92 },\r
93 highlight: {\r
94 fillStyle: '#000',\r
95 radius: 5,\r
96 lineWidth: 2,\r
97 strokeStyle: '#fff'\r
98 }\r
99 }, {\r
100 type: 'line',\r
101 xField: 'theta',\r
102 yField: 'cos',\r
103 smooth: true,\r
104 style: {\r
105 lineWidth: 4\r
106 },\r
107 marker: {\r
108 radius: 4\r
109 },\r
110 highlight: {\r
111 fillStyle: '#000',\r
112 radius: 5,\r
113 lineWidth: 2,\r
114 strokeStyle: '#fff'\r
115 }\r
116 }, {\r
117 type: 'line',\r
118 xField: 'theta',\r
119 yField: 'tan',\r
120 smooth: true,\r
121 style: {\r
122 lineWidth: 4\r
123 },\r
124 marker: {\r
125 radius: 4\r
126 },\r
127 highlight: {\r
128 fillStyle: '#000',\r
129 radius: 5,\r
130 lineWidth: 2,\r
131 strokeStyle: '#fff'\r
132 }\r
133 }]\r
134 //<example>\r
135 }, {\r
136 style: 'margin-top: 10px;',\r
137 xtype: 'gridpanel',\r
138 height: 240,\r
139 columns : {\r
140 defaults: {\r
141 sortable: false,\r
142 menuDisabled: true\r
143 },\r
144 items: [\r
145 { text: 'Theta', dataIndex: 'theta' },\r
146 { text: 'Sin', dataIndex: 'sin' },\r
147 { text: 'Cos', dataIndex: 'cos' },\r
148 { text: 'Tan', dataIndex: 'tan' }\r
149 ]\r
150 },\r
151 store: {\r
152 type: 'spline'\r
153 },\r
154 width: '100%'\r
155 //</example>\r
156 }]\r
157});\r