├── bower.json ├── examples ├── funnel.html ├── gantt.html ├── gauge.html ├── images │ ├── bicycle.png │ ├── car.png │ └── motorcycle.png ├── index.html ├── map.html ├── pie1.html ├── pie2.html ├── pie3.html ├── radar.html ├── serial1.html ├── serial2.html ├── serial3.html ├── stock.html └── xy.html ├── index.js ├── license.txt ├── package.json ├── readme.md ├── responsive.js ├── responsive.min.js └── responsive.min.js.map /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amcharts3-responsive", 3 | "authors": [ 4 | "amCharts " 5 | ], 6 | "description": "amCharts V3 Responsive plugin", 7 | "main": [ 8 | "responsive.js" 9 | ], 10 | "keywords": [ 11 | "amcharts", 12 | "charts", 13 | "javascript", 14 | "plugin" 15 | ], 16 | "moduleType": [ 17 | "globals" 18 | ], 19 | "dependencies": { 20 | "amcharts3": ">= 3.11.1" 21 | }, 22 | "license": "Apache-2.0", 23 | "homepage": "https://www.amcharts.com/", 24 | "repository": { 25 | "type": "git", 26 | "url": "git://github.com/amcharts/responsive.git" 27 | } 28 | } -------------------------------------------------------------------------------- /examples/funnel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 65 | 66 | 67 | 68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /examples/gantt.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 24 | 25 | 300 | 301 | 302 |
303 | 304 | -------------------------------------------------------------------------------- /examples/gauge.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 65 | 66 | 67 | 68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /examples/images/bicycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amcharts/responsive/019d2ae6965113c250ddb40e77f82ff99809cfd6/examples/images/bicycle.png -------------------------------------------------------------------------------- /examples/images/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amcharts/responsive/019d2ae6965113c250ddb40e77f82ff99809cfd6/examples/images/car.png -------------------------------------------------------------------------------- /examples/images/motorcycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amcharts/responsive/019d2ae6965113c250ddb40e77f82ff99809cfd6/examples/images/motorcycle.png -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | amCharts Responsive Example 7 | 8 | 9 | 10 | 49 | 50 | 79 | 80 | 81 | 82 | 83 |
84 | 85 | 86 | 87 | 88 | 103 | 104 |
105 | 106 |
800x500px
107 |
108 | 109 |
110 | 111 | 112 | -------------------------------------------------------------------------------- /examples/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 12 | 19 | 192 | 193 | 194 | 195 |
196 | 197 | 198 | -------------------------------------------------------------------------------- /examples/pie1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 65 | 66 | 67 | 68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /examples/pie2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 67 | 68 | 69 | 70 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /examples/pie3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 23 | 99 | 100 | 101 | 102 |
103 |
104 | 105 | 106 | -------------------------------------------------------------------------------- /examples/radar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 61 | 62 | 63 | 64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /examples/serial1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 197 | 198 | 199 | 200 |
201 | 202 | 203 | -------------------------------------------------------------------------------- /examples/serial2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 12 | 19 | 78 | 79 | 80 | 81 |
82 | 83 | 84 | -------------------------------------------------------------------------------- /examples/serial3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 97 | 98 | 99 | 100 |
101 | 102 | 103 | -------------------------------------------------------------------------------- /examples/stock.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 12 | 21 | 204 | 205 | 206 | 207 |
208 | 209 | 210 | -------------------------------------------------------------------------------- /examples/xy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | amCharts Responsive Example 8 | 9 | 10 | 11 | 18 | 139 | 140 | 141 | 142 |
143 | 144 | 145 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | require("amcharts3/amcharts/amcharts.js"); 2 | require("./responsive.min.js"); 3 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amcharts3-responsive", 3 | "version": "1.0.5", 4 | "license": "SEE LICENSE IN LICENSE", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/amcharts/responsive.git" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # amCharts Responsive 2 | 3 | Version: 1.0.5 4 | 5 | 6 | ## Description 7 | 8 | Use this plugin to enable "responsive" features for amCharts' JavaScript Charts, 9 | JavaScript Stock Chart, or JavaScript Maps. 10 | 11 | "Responsive" chart or map will modify it's features dynamically (even as you 12 | resize the container) based on the available area. For example: a full fledged 13 | line chart with legend guides, labels, titles and other elements will be 14 | displayed in all its glory if container is big enough. 15 | 16 | If the container shrinks (i.e. you resize a browser window or view it on an 17 | iPad), it starts "compacting" the chart. First the legend is removed. Shrink it 18 | even further, axis titles are removed and its value labels are moved inside the 19 | plot area. Going even smaller, bullets, labels gone. All the way to the 20 | sparkline representation of the chart. 21 | 22 | Plugin brings a universal set of pre-defined rules that you can use to instantly 23 | enable responsiveness. Those are custom-tailored for each chart/map type and 24 | will probably fit your requirements out-of the-box. All you need to do is to 25 | enable "responsive" plugin for your chart instance. 26 | 27 | You can modify those defaults rules, or make your own list. The plugin allows 28 | that. (see further down this file for instructions) 29 | 30 | 31 | ## Usage 32 | 33 | 1. Include the minified version of file of this plugin. I.e.: 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | (this needs to go after all the other amCharts includes) 40 | 41 | 2. Add the following setting to your chart configuration: 42 | 43 | ``` 44 | AmCharts.makeChart( "chartdiv", { 45 | ..., 46 | "responsive": { 47 | "enabled": true 48 | } 49 | } ); 50 | ``` 51 | 52 | Or if you are using non-JSON setup: 53 | 54 | ``` 55 | chart.responsive = { 56 | "enabled": true 57 | }; 58 | ``` 59 | 60 | That's it. 61 | 62 | 63 | ## Advanced use 64 | 65 | ### Rules 66 | 67 | You can modify (or completely overwrite) the default responsive rules used by 68 | the plugin. 69 | 70 | A plugin works by checking chart area dimensions after each resize. (or after 71 | initial build / mobile device orientation change) It then overrides particular 72 | settings suitable for these particular dimensions. 73 | 74 | Override rules are implemented by defining chart rules, or just "rules" moving 75 | forward. Each rule has two things: 76 | 77 | 1. Dimension conditions; 78 | 2. Overrides. (a set of properties to override for this particular rule) 79 | 80 | A rule is an object, for example: 81 | 82 | ``` 83 | { 84 | "minWidth": 200, 85 | "maxWidth": 400, 86 | "maxHeight": 400, 87 | "minHeight": 200, 88 | "overrides": { 89 | "precision": 2, 90 | "legend": { 91 | "enabled": false 92 | }, 93 | "valueAxes": { 94 | "inside": true 95 | } 96 | } 97 | } 98 | ``` 99 | 100 | The above rule will be applicable to a chart that is between 200px and 400px in 101 | width and height. 102 | 103 | It is not necessary to add all of the dimensional properties. You just neat at 104 | least one. 105 | 106 | So for example to make the rule apply to all charts with width 400px or lower, 107 | you would do something like this: 108 | 109 | ``` 110 | { 111 | "maxWidth": 400, 112 | "overrides": { 113 | "precision": 2, 114 | "legend": { 115 | "enabled": false 116 | }, 117 | "valueAxes": { 118 | "inside": true 119 | } 120 | } 121 | } 122 | ``` 123 | 124 | Please note that there are several other conditional properties besides the ones 125 | that deal with chart's dimensions: 126 | 127 | * "rotate" (true|false) - set this property if you want to make this rule 128 | applicable to rotated serial chart only (i.e. bar chart) 129 | 130 | * "legendPosition" ("top|bottom|left|right") - set this property if you want the 131 | rule applied only when the chart legend is set to particular position. 132 | Please note that this does not check whether the legend is enabled at all. 133 | 134 | Now, on to explaining "overrides". It's an object, that contains properties that 135 | you want to override the chart's initial ones with. 136 | 137 | It can be either simple properties, like "fontSize" or "precision", or complext 138 | types like object, or array. 139 | 140 | To override a property of a child object, such as "legend", you would simply go 141 | with JSON representation of the properties you need to override. I.e.: 142 | 143 | ``` 144 | "legend": { 145 | "enabled": false 146 | } 147 | ``` 148 | 149 | This will look for a "legend" property in chart object, then change it's 150 | "enabled" property to false. 151 | 152 | ### Overriding arrays of objects 153 | 154 | Some objects in charts are collected in arrays, i.e. "graphs", "valueAxes", etc. 155 | 156 | There are some ways to override their properties as well. 157 | 158 | To override properties for ALL objects in the array, you would provide an 159 | override instruction as an object. I.e.: 160 | 161 | ``` 162 | "graphs": { 163 | "bullet": "round", 164 | "lineThickness": 5 165 | } 166 | ``` 167 | 168 | The above will add a round bullet and set line thickness to all of the graphs on 169 | the chart. 170 | 171 | You can also target individual items in the array. There are two ways to do 172 | that: 173 | 174 | a) Use "id" property; 175 | b) Apply using the same index. 176 | 177 | To individually apply property overrides, you will need to supply override 178 | instructions as an array: 179 | 180 | ``` 181 | "graphs": [ 182 | { 183 | "id": "g1", 184 | "bullet": "round", 185 | "lineThickness": 5 186 | } 187 | ] 188 | ``` 189 | 190 | The above will apply the same properties for the graph with an id of "g1" only. 191 | It will not touch the rest of the graphs. 192 | 193 | Please note that original graph definition in your chart settings needs to have 194 | the "id" property set so this plugin can target it. 195 | 196 | Or you can omit the "id" and just apply overrides in the same order as you have 197 | them defined. I.e.: 198 | 199 | ``` 200 | "graphs": [ 201 | { 202 | "bullet": "round" 203 | }, 204 | { 205 | "bullet": "square" 206 | } 207 | ] 208 | ``` 209 | 210 | The above will apply round bullets to the first defined graph, and square 211 | bullets to the second graph. 212 | 213 | ### Chaining multiple rules 214 | 215 | The cool pat is that you can daisy-chain the override rules, much like in CSS. 216 | 217 | The plugin will examine all of the rules if their dimensional conditions match 218 | current chart condition and will apply their overrides in the same order they 219 | are defined. 220 | 221 | Consider this rule set: 222 | 223 | ``` 224 | "responsive": { 225 | "enabled": true, 226 | "rules": [ 227 | // at 400px wide, we hide legend 228 | { 229 | "maxWidth": 400, 230 | "overrides": { 231 | "legend": { 232 | "enabled" 233 | } 234 | } 235 | }, 236 | 237 | // at 300px or less, we move value axis labels inside plot area 238 | // the legend is still hidden because the above rule is still applicable 239 | { 240 | "maxWidth": 300, 241 | "overrides": { 242 | "valueAxes": { 243 | "inside": true 244 | } 245 | } 246 | }, 247 | 248 | // at 200 px we hide value axis labels altogether 249 | { 250 | "maxWidth": 200, 251 | "overrides": { 252 | "valueAxes": { 253 | "labelsEnabled": false 254 | } 255 | } 256 | } 257 | 258 | ] 259 | } 260 | ``` 261 | 262 | In case several rules modify the same property, the last one will always "win". 263 | 264 | ### Combining custom rules with pre-defined ones 265 | 266 | The plugin will combine your custom rules with pre-defined ones automatically. 267 | 268 | In case you want to go pure and set only your own responsive rules, you can set 269 | property "addDefaultRules" to false. I.e.: 270 | 271 | ``` 272 | "responsive": { 273 | "enabled": true, 274 | "addDefaultRules": false, 275 | "rules": [ 276 | { 277 | "maxWidth": 400, 278 | "overrides": { 279 | "legend": { 280 | "enabled" 281 | } 282 | } 283 | } 284 | ] 285 | } 286 | ``` 287 | 288 | When your custom rules are combined with pre-defined ones, yours are appended at 289 | the end of the list. This means that your rules will always have the "last 290 | word". 291 | 292 | 293 | ## Requirements 294 | 295 | This plugin requires at least 3.13 version of JavaScript Charts, JavaScript 296 | Stock Chart or JavaScript Maps. 297 | 298 | Any older versions will be ignored by this plugin. The charts will function but 299 | no responsive rules will be applied to them. 300 | 301 | 302 | ## Demos 303 | 304 | Run the index.html in the subdirectory /examples. It will allow viewing misc 305 | chart types at various resolutions. 306 | 307 | 308 | ## Extending this plugin 309 | 310 | You're encouraged to modify, extend and make derivative plugins out of this 311 | plugin. 312 | 313 | You can modify files, included in this archive or, better yet, fork this project 314 | on GitHub: 315 | 316 | https://github.com/amcharts/responsive 317 | 318 | We're curious types. Please let us know (contact@amcharts.com) if you do create 319 | something new out of this plugin. 320 | 321 | 322 | ## License 323 | 324 | This plugin is licensed under Apache License 2.0. 325 | 326 | This basically means you're free to use or modify this plugin, even make your 327 | own versions or completely different products out of it. 328 | 329 | Please see attached file "license.txt" for the complete license or online here: 330 | 331 | http://www.apache.org/licenses/LICENSE-2.0 332 | 333 | 334 | ## Contact us 335 | 336 | * Email:contact@amcharts.com 337 | * Web: http://www.amcharts.com/ 338 | * Facebook: https://www.facebook.com/amcharts 339 | * Twitter: https://twitter.com/amcharts 340 | 341 | 342 | ## Changelog 343 | 344 | ### 1.0.5 345 | * Fixed an issue where Responsive plugin was disabling initial animations. 346 | 347 | ### 1.0.4 348 | * Fixed errors when legend was `null` (thanks Hasan Akgün) 349 | 350 | ### 1.0.3 351 | * Fixed issue with Stock Chart when Period Selector and Data Set Selector were turned off 352 | 353 | ### 1.0.2 354 | * Fixed a bug where the plugin was causing an error when chart/map container was being hidden 355 | 356 | ### 1.0.1 357 | * Fixed bug with overrides being overwritten with chart object in some cases 358 | * V3.14 compatibility 359 | 360 | ### 1.0 361 | * Added support for GANTT chart type (available sin JavaScript Charts V3.14) 362 | 363 | ### 0.9.2 364 | * Fixed a custom rules being applied in the wrong order 365 | 366 | ### 0.9.1 367 | * Made all examples use minified version of the plugin 368 | * Introduced removal of grid lines on micro charts 369 | * Tweaked legend hiding dimensions for pie chart 370 | 371 | ### 0.9 372 | * Initial release -------------------------------------------------------------------------------- /responsive.js: -------------------------------------------------------------------------------- 1 | /* 2 | Plugin Name: amCharts Responsive 3 | Description: This plugin add responsive functionality to JavaScript Charts and Maps. 4 | Author: Martynas Majeris, amCharts 5 | Contributors: Ohad Schneider, Hasan Akgün 6 | Version: 1.0.5 7 | Author URI: http://www.amcharts.com/ 8 | 9 | Copyright 2015-2017 amCharts 10 | 11 | Licensed under the Apache License, Version 2.0 (the "License"); 12 | you may not use this file except in compliance with the License. 13 | You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | 23 | Please note that the above license covers only this plugin. It by all means does 24 | not apply to any other amCharts products that are covered by different licenses. 25 | */ 26 | 27 | /*global AmCharts*/ 28 | 29 | AmCharts.addInitHandler( function( chart ) { 30 | "use strict"; 31 | 32 | if ( chart.responsive === undefined || chart.responsive.ready === true || chart.responsive.enabled !== true ) 33 | return; 34 | var version = chart.version.split( "." ); 35 | if ( ( version.length < 2 ) || Number( version[ 0 ] ) < 3 || ( Number( version[ 0 ] ) === 3 && Number( version[ 1 ] ) < 13 ) ) 36 | return; 37 | 38 | // a short variable for easy reference 39 | var r = chart.responsive; 40 | 41 | r.ready = true; 42 | r.currentRules = {}; 43 | r.overridden = []; 44 | 45 | // preserve animation 46 | if ( chart.type === "stock" ) { 47 | if ( 0 > chart.panelsSettings.startDuration ) { 48 | r.startDuration = chart.panelsSettings.startDuration; 49 | chart.panelsSettings.startDuration = 0; 50 | } 51 | } else { 52 | if ( undefined !== chart.startDuration && ( 0 < chart.startDuration ) ) { 53 | r.startDuration = chart.startDuration; 54 | chart.startDuration = 0; 55 | } 56 | } 57 | 58 | // defaults per chart type 59 | var defaults = { 60 | 61 | /** 62 | * AmPie 63 | */ 64 | "pie": [ 65 | 66 | /** 67 | * Disable legend in certain cases 68 | */ 69 | { 70 | "maxWidth": 550, 71 | "legendPosition": "left", 72 | "overrides": { 73 | "legend": { 74 | "enabled": false 75 | } 76 | } 77 | }, { 78 | "maxWidth": 550, 79 | "legendPosition": "right", 80 | "overrides": { 81 | "legend": { 82 | "enabled": false 83 | } 84 | } 85 | }, { 86 | "maxWidth": 150, 87 | "overrides": { 88 | "legend": { 89 | "enabled": false 90 | } 91 | } 92 | }, { 93 | "maxHeight": 350, 94 | "legendPosition": "top", 95 | "overrides": { 96 | "legend": { 97 | "enabled": false 98 | } 99 | } 100 | }, { 101 | "maxHeight": 350, 102 | "legendPosition": "bottom", 103 | "overrides": { 104 | "legend": { 105 | "enabled": false 106 | } 107 | } 108 | }, { 109 | "maxHeight": 150, 110 | "overrides": { 111 | "legend": { 112 | "enabled": false 113 | } 114 | } 115 | }, 116 | 117 | /** 118 | * Narrow chart 119 | */ 120 | { 121 | "maxWidth": 400, 122 | "overrides": { 123 | "labelsEnabled": false 124 | } 125 | }, { 126 | "maxWidth": 100, 127 | "overrides": { 128 | "legend": { 129 | "enabled": false 130 | } 131 | } 132 | }, 133 | 134 | /** 135 | * Short chart 136 | */ 137 | { 138 | "maxHeight": 350, 139 | "overrides": { 140 | "pullOutRadius": 0 141 | } 142 | }, { 143 | "maxHeight": 200, 144 | "overrides": { 145 | "titles": { 146 | "enabled": false 147 | }, 148 | "labelsEnabled": false 149 | } 150 | }, 151 | 152 | /** 153 | * Supersmall 154 | */ 155 | { 156 | "maxWidth": 60, 157 | "overrides": { 158 | "autoMargins": false, 159 | "marginTop": 0, 160 | "marginBottom": 0, 161 | "marginLeft": 0, 162 | "marginRight": 0, 163 | "radius": "50%", 164 | "innerRadius": 0, 165 | "balloon": { 166 | "enabled": false 167 | }, 168 | "legend": { 169 | "enabled": false 170 | } 171 | } 172 | }, { 173 | "maxHeight": 60, 174 | "overrides": { 175 | "marginTop": 0, 176 | "marginBottom": 0, 177 | "marginLeft": 0, 178 | "marginRight": 0, 179 | "radius": "50%", 180 | "innerRadius": 0, 181 | "balloon": { 182 | "enabled": false 183 | }, 184 | "legend": { 185 | "enabled": false 186 | } 187 | } 188 | } 189 | ], 190 | 191 | /** 192 | * AmFunnel 193 | */ 194 | "funnel": [ { 195 | "maxWidth": 550, 196 | "legendPosition": "left", 197 | "overrides": { 198 | "legend": { 199 | "enabled": false 200 | } 201 | } 202 | }, { 203 | "maxWidth": 550, 204 | "legendPosition": "right", 205 | "overrides": { 206 | "legend": { 207 | "enabled": false 208 | } 209 | } 210 | }, { 211 | "maxWidth": 150, 212 | "overrides": { 213 | "legend": { 214 | "enabled": false 215 | } 216 | } 217 | }, { 218 | "maxHeight": 500, 219 | "legendPosition": "top", 220 | "overrides": { 221 | "legend": { 222 | "enabled": false 223 | } 224 | } 225 | }, { 226 | "maxHeight": 500, 227 | "legendPosition": "bottom", 228 | "overrides": { 229 | "legend": { 230 | "enabled": false 231 | } 232 | } 233 | }, { 234 | "maxHeight": 150, 235 | "overrides": { 236 | "legend": { 237 | "enabled": false 238 | } 239 | } 240 | }, { 241 | "maxWidth": 400, 242 | "overrides": { 243 | "labelsEnabled": false, 244 | "marginLeft": 10, 245 | "marginRight": 10, 246 | "legend": { 247 | "enabled": false 248 | } 249 | } 250 | }, { 251 | "maxHeight": 350, 252 | "overrides": { 253 | "pullOutRadius": 0, 254 | "legend": { 255 | "enabled": false 256 | } 257 | } 258 | }, { 259 | "maxHeight": 300, 260 | "overrides": { 261 | "titles": { 262 | "enabled": false 263 | } 264 | } 265 | } ], 266 | 267 | /** 268 | * AmRadar 269 | */ 270 | "radar": [ { 271 | "maxWidth": 550, 272 | "legendPosition": "left", 273 | "overrides": { 274 | "legend": { 275 | "enabled": false 276 | } 277 | } 278 | }, { 279 | "maxWidth": 550, 280 | "legendPosition": "right", 281 | "overrides": { 282 | "legend": { 283 | "enabled": false 284 | } 285 | } 286 | }, { 287 | "maxWidth": 150, 288 | "overrides": { 289 | "legend": { 290 | "enabled": false 291 | } 292 | } 293 | }, { 294 | "maxHeight": 350, 295 | "legendPosition": "top", 296 | "overrides": { 297 | "legend": { 298 | "enabled": false 299 | } 300 | } 301 | }, { 302 | "maxHeight": 350, 303 | "legendPosition": "bottom", 304 | "overrides": { 305 | "legend": { 306 | "enabled": false 307 | } 308 | } 309 | }, { 310 | "maxHeight": 150, 311 | "overrides": { 312 | "legend": { 313 | "enabled": false 314 | } 315 | } 316 | }, { 317 | "maxWidth": 300, 318 | "overrides": { 319 | "labelsEnabled": false 320 | } 321 | }, { 322 | "maxWidth": 200, 323 | "overrides": { 324 | "autoMargins": false, 325 | "marginTop": 0, 326 | "marginBottom": 0, 327 | "marginLeft": 0, 328 | "marginRight": 0, 329 | "radius": "50%", 330 | "titles": { 331 | "enabled": false 332 | }, 333 | "valueAxes": { 334 | "labelsEnabled": false, 335 | "radarCategoriesEnabled": false 336 | } 337 | } 338 | }, { 339 | "maxHeight": 300, 340 | "overrides": { 341 | "labelsEnabled": false 342 | } 343 | }, { 344 | "maxHeight": 200, 345 | "overrides": { 346 | "autoMargins": false, 347 | "marginTop": 0, 348 | "marginBottom": 0, 349 | "marginLeft": 0, 350 | "marginRight": 0, 351 | "radius": "50%", 352 | "titles": { 353 | "enabled": false 354 | }, 355 | "valueAxes": { 356 | "radarCategoriesEnabled": false 357 | } 358 | } 359 | }, { 360 | "maxHeight": 100, 361 | "overrides": { 362 | "valueAxes": { 363 | "labelsEnabled": false 364 | } 365 | } 366 | } ], 367 | 368 | /** 369 | * AmGauge 370 | */ 371 | "gauge": [ { 372 | "maxWidth": 550, 373 | "legendPosition": "left", 374 | "overrides": { 375 | "legend": { 376 | "enabled": false 377 | } 378 | } 379 | }, { 380 | "maxWidth": 550, 381 | "legendPosition": "right", 382 | "overrides": { 383 | "legend": { 384 | "enabled": false 385 | } 386 | } 387 | }, { 388 | "maxWidth": 150, 389 | "overrides": { 390 | "legend": { 391 | "enabled": false 392 | } 393 | } 394 | }, { 395 | "maxHeight": 500, 396 | "legendPosition": "top", 397 | "overrides": { 398 | "legend": { 399 | "enabled": false 400 | } 401 | } 402 | }, { 403 | "maxHeight": 500, 404 | "legendPosition": "bottom", 405 | "overrides": { 406 | "legend": { 407 | "enabled": false 408 | } 409 | } 410 | }, { 411 | "maxHeight": 150, 412 | "overrides": { 413 | "legend": { 414 | "enabled": false 415 | } 416 | } 417 | }, { 418 | "maxWidth": 200, 419 | "overrides": { 420 | "titles": { 421 | "enabled": false 422 | }, 423 | "allLabels": { 424 | "enabled": false 425 | }, 426 | "axes": { 427 | "labelsEnabled": false 428 | } 429 | } 430 | }, { 431 | "maxHeight": 200, 432 | "overrides": { 433 | "titles": { 434 | "enabled": false 435 | }, 436 | "allLabels": { 437 | "enabled": false 438 | }, 439 | "axes": { 440 | "labelsEnabled": false 441 | } 442 | } 443 | } ], 444 | 445 | /** 446 | * AmSerial 447 | */ 448 | "serial": [ 449 | 450 | /** 451 | * Disable legend in certain cases 452 | */ 453 | { 454 | "maxWidth": 550, 455 | "legendPosition": "left", 456 | "overrides": { 457 | "legend": { 458 | "enabled": false 459 | } 460 | } 461 | }, { 462 | "maxWidth": 550, 463 | "legendPosition": "right", 464 | "overrides": { 465 | "legend": { 466 | "enabled": false 467 | } 468 | } 469 | }, { 470 | "maxWidth": 100, 471 | "overrides": { 472 | "legend": { 473 | "enabled": false 474 | } 475 | } 476 | }, { 477 | "maxHeight": 350, 478 | "legendPosition": "top", 479 | "overrides": { 480 | "legend": { 481 | "enabled": false 482 | } 483 | } 484 | }, { 485 | "maxHeight": 350, 486 | "legendPosition": "bottom", 487 | "overrides": { 488 | "legend": { 489 | "enabled": false 490 | } 491 | } 492 | }, { 493 | "maxHeight": 100, 494 | "overrides": { 495 | "legend": { 496 | "enabled": false 497 | } 498 | } 499 | }, 500 | 501 | 502 | /** 503 | * Narrow chart 504 | */ 505 | { 506 | "maxWidth": 350, 507 | "overrides": { 508 | "autoMarginOffset": 0, 509 | "graphs": { 510 | "hideBulletsCount": 10 511 | } 512 | } 513 | }, { 514 | "maxWidth": 350, 515 | "rotate": false, 516 | "overrides": { 517 | "marginLeft": 10, 518 | "marginRight": 10, 519 | "valueAxes": { 520 | "ignoreAxisWidth": true, 521 | "inside": true, 522 | "title": "", 523 | "showFirstLabel": false, 524 | "showLastLabel": false 525 | }, 526 | "graphs": { 527 | "bullet": "none" 528 | } 529 | } 530 | }, { 531 | "maxWidth": 350, 532 | "rotate": true, 533 | "overrides": { 534 | "marginLeft": 10, 535 | "marginRight": 10, 536 | "categoryAxis": { 537 | "ignoreAxisWidth": true, 538 | "inside": true, 539 | "title": "" 540 | } 541 | } 542 | }, { 543 | "maxWidth": 200, 544 | "rotate": false, 545 | "overrides": { 546 | "marginLeft": 10, 547 | "marginRight": 10, 548 | "marginTop": 10, 549 | "marginBottom": 10, 550 | "categoryAxis": { 551 | "ignoreAxisWidth": true, 552 | "labelsEnabled": false, 553 | "inside": true, 554 | "title": "", 555 | "guides": { 556 | "inside": true 557 | } 558 | }, 559 | "valueAxes": { 560 | "ignoreAxisWidth": true, 561 | "labelsEnabled": false, 562 | "axisAlpha": 0, 563 | "guides": { 564 | "label": "" 565 | } 566 | }, 567 | "legend": { 568 | "enabled": false 569 | } 570 | } 571 | }, { 572 | "maxWidth": 200, 573 | "rotate": true, 574 | "overrides": { 575 | "chartScrollbar": { 576 | "scrollbarHeight": 4, 577 | "graph": "", 578 | "resizeEnabled": false 579 | }, 580 | "categoryAxis": { 581 | "labelsEnabled": false, 582 | "axisAlpha": 0, 583 | "guides": { 584 | "label": "" 585 | } 586 | }, 587 | "legend": { 588 | "enabled": false 589 | } 590 | } 591 | }, { 592 | "maxWidth": 100, 593 | "rotate": false, 594 | "overrides": { 595 | "valueAxes": { 596 | "gridAlpha": 0 597 | } 598 | } 599 | }, { 600 | "maxWidth": 100, 601 | "rotate": true, 602 | "overrides": { 603 | "categoryAxis": { 604 | "gridAlpha": 0 605 | } 606 | } 607 | }, 608 | 609 | /** 610 | * Short chart 611 | */ 612 | { 613 | "maxHeight": 300, 614 | "overrides": { 615 | "autoMarginOffset": 0, 616 | "graphs": { 617 | "hideBulletsCount": 10 618 | } 619 | } 620 | }, { 621 | "maxHeight": 200, 622 | "rotate": false, 623 | "overrides": { 624 | "marginTop": 10, 625 | "marginBottom": 10, 626 | "categoryAxis": { 627 | "ignoreAxisWidth": true, 628 | "inside": true, 629 | "title": "", 630 | "showFirstLabel": false, 631 | "showLastLabel": false 632 | } 633 | } 634 | }, { 635 | "maxHeight": 200, 636 | "rotate": true, 637 | "overrides": { 638 | "marginTop": 10, 639 | "marginBottom": 10, 640 | "valueAxes": { 641 | "ignoreAxisWidth": true, 642 | "inside": true, 643 | "title": "", 644 | "showFirstLabel": false, 645 | "showLastLabel": false 646 | }, 647 | "graphs": { 648 | "bullet": "none" 649 | } 650 | } 651 | }, { 652 | "maxHeight": 150, 653 | "rotate": false, 654 | "overrides": { 655 | "titles": { 656 | "enabled": false 657 | }, 658 | "chartScrollbar": { 659 | "scrollbarHeight": 4, 660 | "graph": "", 661 | "resizeEnabled": false 662 | }, 663 | "categoryAxis": { 664 | "labelsEnabled": false, 665 | "ignoreAxisWidth": true, 666 | "axisAlpha": 0, 667 | "guides": { 668 | "label": "" 669 | } 670 | } 671 | } 672 | }, { 673 | "maxHeight": 150, 674 | "rotate": true, 675 | "overrides": { 676 | "titles": { 677 | "enabled": false 678 | }, 679 | "valueAxes": { 680 | "labelsEnabled": false, 681 | "ignoreAxisWidth": true, 682 | "axisAlpha": 0, 683 | "guides": { 684 | "label": "" 685 | } 686 | } 687 | } 688 | }, { 689 | "maxHeight": 100, 690 | "rotate": false, 691 | "overrides": { 692 | "valueAxes": { 693 | "labelsEnabled": false, 694 | "ignoreAxisWidth": true, 695 | "axisAlpha": 0, 696 | "gridAlpha": 0, 697 | "guides": { 698 | "label": "" 699 | } 700 | } 701 | } 702 | }, { 703 | "maxHeight": 100, 704 | "rotate": true, 705 | "overrides": { 706 | "categoryAxis": { 707 | "labelsEnabled": false, 708 | "ignoreAxisWidth": true, 709 | "axisAlpha": 0, 710 | "gridAlpha": 0, 711 | "guides": { 712 | "label": "" 713 | } 714 | } 715 | } 716 | }, 717 | 718 | /** 719 | * Really small charts: microcharts and sparklines 720 | */ 721 | { 722 | "maxWidth": 100, 723 | "overrides": { 724 | "autoMargins": false, 725 | "marginTop": 0, 726 | "marginBottom": 0, 727 | "marginLeft": 0, 728 | "marginRight": 0, 729 | "categoryAxis": { 730 | "labelsEnabled": false 731 | }, 732 | "valueAxes": { 733 | "labelsEnabled": false 734 | } 735 | } 736 | }, { 737 | "maxHeight": 100, 738 | "overrides": { 739 | "autoMargins": false, 740 | "marginTop": 0, 741 | "marginBottom": 0, 742 | "marginLeft": 0, 743 | "marginRight": 0, 744 | "categoryAxis": { 745 | "labelsEnabled": false 746 | }, 747 | "valueAxes": { 748 | "labelsEnabled": false 749 | } 750 | } 751 | } 752 | ], 753 | 754 | /** 755 | * AmXY 756 | */ 757 | "xy": [ 758 | 759 | /** 760 | * Disable legend in certain cases 761 | */ 762 | { 763 | "maxWidth": 550, 764 | "legendPosition": "left", 765 | "overrides": { 766 | "legend": { 767 | "enabled": false 768 | } 769 | } 770 | }, { 771 | "maxWidth": 550, 772 | "legendPosition": "right", 773 | "overrides": { 774 | "legend": { 775 | "enabled": false 776 | } 777 | } 778 | }, { 779 | "maxWidth": 100, 780 | "overrides": { 781 | "legend": { 782 | "enabled": false 783 | } 784 | } 785 | }, { 786 | "maxHeight": 350, 787 | "legendPosition": "top", 788 | "overrides": { 789 | "legend": { 790 | "enabled": false 791 | } 792 | } 793 | }, { 794 | "maxHeight": 350, 795 | "legendPosition": "bottom", 796 | "overrides": { 797 | "legend": { 798 | "enabled": false 799 | } 800 | } 801 | }, { 802 | "maxHeight": 100, 803 | "overrides": { 804 | "legend": { 805 | "enabled": false 806 | } 807 | } 808 | }, 809 | 810 | /** 811 | * Narrow chart 812 | */ 813 | { 814 | "maxWidth": 250, 815 | "overrides": { 816 | "autoMarginOffset": 0, 817 | "autoMargins": false, 818 | "marginTop": 0, 819 | "marginBottom": 0, 820 | "marginLeft": 0, 821 | "marginRight": 0, 822 | "valueAxes": { 823 | "inside": true, 824 | "title": "", 825 | "showFirstLabel": false, 826 | "showLastLabel": false 827 | }, 828 | "legend": { 829 | "enabled": false 830 | } 831 | } 832 | }, { 833 | "maxWidth": 150, 834 | "overrides": { 835 | "valueyAxes": { 836 | "labelsEnabled": false, 837 | "axisAlpha": 0, 838 | "gridAlpha": 0, 839 | "guides": { 840 | "label": "" 841 | } 842 | } 843 | } 844 | }, 845 | 846 | /** 847 | * Short chart 848 | */ 849 | { 850 | "maxHeight": 250, 851 | "overrides": { 852 | "autoMarginOffset": 0, 853 | "autoMargins": false, 854 | "marginTop": 0, 855 | "marginBottom": 0, 856 | "marginLeft": 0, 857 | "marginRight": 0, 858 | "valueAxes": { 859 | "inside": true, 860 | "title": "", 861 | "showFirstLabel": false, 862 | "showLastLabel": false 863 | }, 864 | "legend": { 865 | "enabled": false 866 | } 867 | } 868 | }, { 869 | "maxWidth": 150, 870 | "overrides": { 871 | "valueyAxes": { 872 | "labelsEnabled": false, 873 | "axisAlpha": 0, 874 | "gridAlpha": 0, 875 | "guides": { 876 | "label": "" 877 | } 878 | } 879 | } 880 | } 881 | ], 882 | 883 | /** 884 | * AmStock 885 | */ 886 | "stock": [ { 887 | "maxWidth": 500, 888 | "overrides": { 889 | "dataSetSelector": { 890 | "position": "top" 891 | }, 892 | "periodSelector": { 893 | "position": "bottom" 894 | } 895 | } 896 | }, { 897 | "maxWidth": 400, 898 | "overrides": { 899 | "dataSetSelector": { 900 | "selectText": "", 901 | "compareText": "" 902 | }, 903 | "periodSelector": { 904 | "periodsText": "", 905 | "inputFieldsEnabled": false 906 | } 907 | } 908 | } ], 909 | 910 | /** 911 | * AmMap 912 | */ 913 | "map": [ { 914 | "maxWidth": 200, 915 | "overrides": { 916 | "zoomControl": { 917 | "zoomControlEnabled": false 918 | }, 919 | "smallMap": { 920 | "enabled": false 921 | }, 922 | "valueLegend": { 923 | "enabled": false 924 | }, 925 | "dataProvider": { 926 | "areas": { 927 | "descriptionWindowWidth": 160, 928 | "descriptionWindowRight": 10, 929 | "descriptionWindowTop": 10 930 | }, 931 | "images": { 932 | "descriptionWindowWidth": 160, 933 | "descriptionWindowRight": 10, 934 | "descriptionWindowTop": 10 935 | }, 936 | "lines": { 937 | "descriptionWindowWidth": 160, 938 | "descriptionWindowRight": 10, 939 | "descriptionWindowTop": 10 940 | } 941 | } 942 | } 943 | }, { 944 | "maxWidth": 150, 945 | "overrides": { 946 | "dataProvider": { 947 | "areas": { 948 | "descriptionWindowWidth": 110, 949 | "descriptionWindowRight": 10, 950 | "descriptionWindowTop": 10 951 | }, 952 | "images": { 953 | "descriptionWindowWidth": 110, 954 | "descriptionWindowRight": 10, 955 | "descriptionWindowTop": 10 956 | }, 957 | "lines": { 958 | "descriptionWindowWidth": 110, 959 | "descriptionWindowLeft": 10, 960 | "descriptionWindowRight": 10 961 | } 962 | } 963 | } 964 | }, { 965 | "maxHeight": 200, 966 | "overrides": { 967 | "zoomControl": { 968 | "zoomControlEnabled": false 969 | }, 970 | "smallMap": { 971 | "enabled": false 972 | }, 973 | "valueLegend": { 974 | "enabled": false 975 | }, 976 | "dataProvider": { 977 | "areas": { 978 | "descriptionWindowHeight": 160, 979 | "descriptionWindowRight": 10, 980 | "descriptionWindowTop": 10 981 | }, 982 | "images": { 983 | "descriptionWindowHeight": 160, 984 | "descriptionWindowRight": 10, 985 | "descriptionWindowTop": 10 986 | }, 987 | "lines": { 988 | "descriptionWindowHeight": 160, 989 | "descriptionWindowRight": 10, 990 | "descriptionWindowTop": 10 991 | } 992 | } 993 | } 994 | }, { 995 | "maxHeight": 150, 996 | "overrides": { 997 | "dataProvider": { 998 | "areas": { 999 | "descriptionWindowHeight": 110, 1000 | "descriptionWindowRight": 10, 1001 | "descriptionWindowTop": 10 1002 | }, 1003 | "images": { 1004 | "descriptionWindowHeight": 110, 1005 | "descriptionWindowRight": 10, 1006 | "descriptionWindowTop": 10 1007 | }, 1008 | "lines": { 1009 | "descriptionWindowHeight": 110, 1010 | "descriptionWindowLeft": 10, 1011 | "descriptionWindowRight": 10 1012 | } 1013 | } 1014 | } 1015 | } ] 1016 | }; 1017 | 1018 | var isNullOrUndefined = function( obj ) { 1019 | return ( obj === null ) || ( obj === undefined ); 1020 | }; 1021 | 1022 | var isArray = function( obj ) { 1023 | return ( !isNullOrUndefined( obj ) && Object.prototype.toString.call( obj ) === "[object Array]" ); 1024 | }; 1025 | 1026 | var isObject = function( obj ) { 1027 | return ( obj !== null && typeof obj === "object" ); //the null check is necessary - recall that typeof null === "object" ! 1028 | }; 1029 | 1030 | var findArrayObjectById = function( arr, id ) { 1031 | for ( var i = 0; i < arr.length; i++ ) { 1032 | if ( isObject( arr[ i ] ) && arr[ i ].id === id ) 1033 | return arr[ i ]; 1034 | } 1035 | return undefined; //we can use undefined as it doesn't have an Id property and so will never be the desired object from the array 1036 | }; 1037 | 1038 | var cloneWithoutPrototypes = function( obj ) { 1039 | if ( !isObject( obj ) ) { 1040 | return obj; 1041 | } 1042 | 1043 | if ( isArray( obj ) ) { 1044 | return obj.slice(); //effectively clones the array 1045 | } 1046 | 1047 | var clone = {}; //here is where we lose the prototype 1048 | for ( var property in obj ) { 1049 | if ( Object.prototype.hasOwnProperty.call( obj, property ) ) { 1050 | clone[ property ] = cloneWithoutPrototypes( obj[ property ] ); 1051 | } 1052 | } 1053 | return clone; 1054 | }; 1055 | 1056 | var originalValueRetainerPrefix = "{F0578839-A214-4E2D-8D1B-44941ECE8332}_"; 1057 | var noOriginalPropertyStub = {}; 1058 | 1059 | var overrideProperty = function( object, property, overrideValue ) { 1060 | 1061 | var originalValueRetainerProperty = originalValueRetainerPrefix + property; 1062 | if ( !( originalValueRetainerProperty in object ) ) { 1063 | object[ originalValueRetainerProperty ] = ( property in object ) ? object[ property ] : noOriginalPropertyStub; 1064 | } 1065 | 1066 | object[ property ] = cloneWithoutPrototypes( overrideValue ); 1067 | 1068 | r.overridden.push( { 1069 | object: object, 1070 | property: property 1071 | } ); 1072 | }; 1073 | 1074 | var restoreOriginalProperty = function( object, property ) { 1075 | var originalValue = object[ originalValueRetainerPrefix + property ]; 1076 | if ( originalValue === noOriginalPropertyStub ) { 1077 | delete object[ property ]; 1078 | } else { 1079 | object[ property ] = originalValue; 1080 | } 1081 | }; 1082 | 1083 | var restoreOriginals = function() { 1084 | while ( r.overridden.length > 0 ) { 1085 | var override = r.overridden.pop(); 1086 | restoreOriginalProperty( override.object, override.property ); 1087 | } 1088 | }; 1089 | 1090 | var redrawChart = function() { 1091 | chart.dataChanged = true; 1092 | if ( chart.type !== "xy" ) { 1093 | chart.marginsUpdated = false; 1094 | } 1095 | chart.zoomOutOnDataUpdate = false; 1096 | chart.validateNow( true ); 1097 | restoreOriginalProperty( chart, "zoomOutOnDataUpdate" ); 1098 | animateAgain(); 1099 | }; 1100 | 1101 | var animateAgain = function() { 1102 | // make the chart animate again 1103 | if ( r.startDuration ) { 1104 | if ( chart.type === "stock" ) { 1105 | chart.panelsSettings.startDuration = r.startDuration; 1106 | for ( var x = 0; x < chart.panels.length; x++ ) { 1107 | chart.panels[ x ].startDuration = r.startDuration; 1108 | chart.panels[ x ].animateAgain(); 1109 | } 1110 | } else { 1111 | chart.startDuration = r.startDuration; 1112 | if ( chart.animateAgain !== undefined ) 1113 | chart.animateAgain(); 1114 | } 1115 | delete r.startDuration; 1116 | } 1117 | } 1118 | 1119 | var applyConfig = function( current, override ) { 1120 | 1121 | if ( isNullOrUndefined( override ) ) { 1122 | return; 1123 | } 1124 | 1125 | for ( var property in override ) { 1126 | if ( !Object.prototype.hasOwnProperty.call( override, property ) ) { 1127 | continue; 1128 | } 1129 | 1130 | var currentValue = current[ property ]; 1131 | var overrideValue = override[ property ]; 1132 | 1133 | //property doesn't exist on current object or it exists as null/undefined => completely override it 1134 | if ( isNullOrUndefined( currentValue ) ) { 1135 | if ( property !== "periodSelector" && property !== "dataSetSelector" ) // do not attempt to override non-existing selectors 1136 | overrideProperty( current, property, overrideValue ); 1137 | continue; 1138 | } 1139 | 1140 | //current value is an array => override method depends on override form 1141 | if ( isArray( currentValue ) ) { 1142 | 1143 | //override value is an array => override method depends on array elements 1144 | if ( isArray( overrideValue ) ) { 1145 | 1146 | //current value is an array of non-objects => override the entire array 1147 | //we assume a uniformly-typed array, so checking the first value should suffice 1148 | if ( ( currentValue.length > 0 && !isObject( currentValue[ 0 ] ) ) || ( overrideValue.length > 0 && !isObject( overrideValue[ 0 ] ) ) ) { 1149 | overrideProperty( current, property, overrideValue ); 1150 | continue; 1151 | } 1152 | 1153 | var idPresentOnAllOverrideElements = true; 1154 | for ( var k = 0; k < overrideValue.length; k++ ) { 1155 | if ( isNullOrUndefined( overrideValue[ k ] ) || isNullOrUndefined( overrideValue[ k ].id ) ) { 1156 | idPresentOnAllOverrideElements = false; 1157 | break; 1158 | } 1159 | } 1160 | 1161 | //Id property is present on all override elements => override elements by ID 1162 | if ( idPresentOnAllOverrideElements ) { 1163 | for ( var i = 0; i < overrideValue.length; i++ ) { 1164 | var correspondingCurrentElement = findArrayObjectById( currentValue, overrideValue[ i ].id ); 1165 | if ( correspondingCurrentElement === undefined ) { 1166 | throw ( 'could not find element to override in "' + property + '" with ID: ' + overrideValue[ i ].id ); 1167 | } 1168 | applyConfig( correspondingCurrentElement, overrideValue[ i ] ); 1169 | } 1170 | continue; 1171 | } 1172 | 1173 | //Id property is not set on all override elements and there aren't too many overrides => override objects by their index 1174 | if ( overrideValue.length <= currentValue.length ) { 1175 | for ( var l = 0; l < overrideValue.length; l++ ) { 1176 | applyConfig( currentValue[ l ], overrideValue[ l ] ); 1177 | } 1178 | continue; 1179 | } 1180 | 1181 | throw "too many index-based overrides specified for object array property: " + property; 1182 | } 1183 | 1184 | // override value is a single object => override all current array objects with that object 1185 | if ( isObject( overrideValue ) ) { 1186 | for ( var j = 0; j < currentValue.length; j++ ) { 1187 | applyConfig( currentValue[ j ], overrideValue ); 1188 | } 1189 | continue; 1190 | } 1191 | 1192 | throw ( "non-object override detected for array property: " + property ); 1193 | } 1194 | 1195 | if ( isObject( currentValue ) ) { 1196 | applyConfig( currentValue, overrideValue ); 1197 | continue; 1198 | } 1199 | 1200 | //if we reached this point, the property is defined on the current object but is not an object => override it 1201 | overrideProperty( current, property, overrideValue ); 1202 | } 1203 | }; 1204 | 1205 | var checkRules = function() { 1206 | 1207 | var width = chart.divRealWidth; 1208 | var height = chart.divRealHeight; 1209 | 1210 | // do nothing if the container is hidden (has no size) 1211 | if ( width === 0 || height === 0 ) 1212 | return; 1213 | 1214 | // update current rules 1215 | var rulesChanged = false; 1216 | for ( var i = 0; i < r.rules.length; i++ ) { 1217 | var rule = r.rules[ i ]; 1218 | 1219 | var ruleMatches = 1220 | ( isNullOrUndefined( rule.minWidth ) || ( rule.minWidth <= width ) ) && ( isNullOrUndefined( rule.maxWidth ) || ( rule.maxWidth >= width ) ) && 1221 | ( isNullOrUndefined( rule.minHeight ) || ( rule.minHeight <= height ) ) && ( isNullOrUndefined( rule.maxHeight ) || ( rule.maxHeight >= height ) ) && 1222 | ( isNullOrUndefined( rule.rotate ) || ( rule.rotate === true && chart.rotate === true ) || ( rule.rotate === false && ( isNullOrUndefined( chart.rotate ) || chart.rotate === false ) ) ) && 1223 | ( isNullOrUndefined( rule.legendPosition ) || ( !isNullOrUndefined( chart.legend ) && !isNullOrUndefined( chart.legend.position ) && chart.legend.position === rule.legendPosition ) ); 1224 | 1225 | if ( ruleMatches ) { 1226 | if ( isNullOrUndefined( r.currentRules[ i ] ) ) { 1227 | r.currentRules[ i ] = true; 1228 | rulesChanged = true; 1229 | } 1230 | } else if ( !isNullOrUndefined( r.currentRules[ i ] ) ) { 1231 | r.currentRules[ i ] = undefined; 1232 | rulesChanged = true; 1233 | } 1234 | } 1235 | 1236 | if ( !rulesChanged ) { 1237 | animateAgain(); 1238 | return; 1239 | } 1240 | 1241 | restoreOriginals(); 1242 | 1243 | for ( var key in r.currentRules ) { 1244 | if ( !Object.prototype.hasOwnProperty.call( r.currentRules, key ) ) { 1245 | continue; 1246 | } 1247 | 1248 | if ( !isNullOrUndefined( r.currentRules[ key ] ) ) { 1249 | if ( isNullOrUndefined( r.rules[ key ] ) ) { 1250 | throw "null or undefined rule in index: " + key; 1251 | } 1252 | applyConfig( chart, r.rules[ key ].overrides ); 1253 | } 1254 | } 1255 | 1256 | // TODO - re-apply zooms/slices as necessary 1257 | redrawChart(); 1258 | }; 1259 | 1260 | defaults.gantt = defaults.serial; 1261 | 1262 | if ( !isArray( r.rules ) ) { 1263 | r.rules = defaults[ chart.type ]; 1264 | } else if ( r.addDefaultRules !== false ) { 1265 | r.rules = defaults[ chart.type ].concat( r.rules ); 1266 | } 1267 | 1268 | //retain original zoomOutOnDataUpdate value 1269 | overrideProperty( chart, "zoomOutOnDataUpdate", chart.zoomOutOnDataUpdate ); 1270 | 1271 | chart.addListener( "resized", checkRules ); 1272 | chart.addListener( "init", checkRules ); 1273 | 1274 | }, [ "pie", "serial", "xy", "funnel", "radar", "gauge", "gantt", "stock", "map" ] ); -------------------------------------------------------------------------------- /responsive.min.js: -------------------------------------------------------------------------------- 1 | AmCharts.addInitHandler(function(e){"use strict";if(void 0!==e.responsive&&e.responsive.ready!==!0&&e.responsive.enabled===!0){var i=e.version.split(".");if(!(i.length<2||Number(i[0])<3||3===Number(i[0])&&Number(i[1])<13)){var t=e.responsive;t.ready=!0,t.currentRules={},t.overridden=[],"stock"===e.type?0>e.panelsSettings.startDuration&&(t.startDuration=e.panelsSettings.startDuration,e.panelsSettings.startDuration=0):void 0!==e.startDuration&&00;){var e=t.overridden.pop();m(e.object,e.property)}},p=function(){e.dataChanged=!0,"xy"!==e.type&&(e.marginsUpdated=!1),e.zoomOutOnDataUpdate=!1,e.validateNow(!0),m(e,"zoomOutOnDataUpdate"),u()},u=function(){if(t.startDuration){if("stock"===e.type){e.panelsSettings.startDuration=t.startDuration;for(var i=0;i0&&!o(a[0])||l.length>0&&!o(l[0])){h(e,t,l);continue}for(var s=!0,g=0;g=i)&&(r(d.minHeight)||d.minHeight<=a)&&(r(d.maxHeight)||d.maxHeight>=a)&&(r(d.rotate)||d.rotate===!0&&e.rotate===!0||d.rotate===!1&&(r(e.rotate)||e.rotate===!1))&&(r(d.legendPosition)||!r(e.legend)&&!r(e.legend.position)&&e.legend.position===d.legendPosition);l?r(t.currentRules[o])&&(t.currentRules[o]=!0,n=!0):r(t.currentRules[o])||(t.currentRules[o]=void 0,n=!0)}if(!n)return void u();b();for(var s in t.currentRules)if(Object.prototype.hasOwnProperty.call(t.currentRules,s)&&!r(t.currentRules[s])){if(r(t.rules[s]))throw"null or undefined rule in index: "+s;v(e,t.rules[s].overrides)}p()}};a.gantt=a.serial,n(t.rules)?t.addDefaultRules!==!1&&(t.rules=a[e.type].concat(t.rules)):t.rules=a[e.type],h(e,"zoomOutOnDataUpdate",e.zoomOutOnDataUpdate),e.addListener("resized",x),e.addListener("init",x)}}},["pie","serial","xy","funnel","radar","gauge","gantt","stock","map"]); 2 | //# sourceMappingURL=responsive.min.js.map -------------------------------------------------------------------------------- /responsive.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["responsive.js"],"names":["AmCharts","addInitHandler","chart","undefined","responsive","ready","enabled","version","split","length","Number","r","currentRules","overridden","type","panelsSettings","startDuration","defaults","pie","maxWidth","legendPosition","overrides","legend","maxHeight","labelsEnabled","pullOutRadius","titles","autoMargins","marginTop","marginBottom","marginLeft","marginRight","radius","innerRadius","balloon","funnel","radar","valueAxes","radarCategoriesEnabled","gauge","allLabels","axes","serial","autoMarginOffset","graphs","hideBulletsCount","rotate","ignoreAxisWidth","inside","title","showFirstLabel","showLastLabel","bullet","categoryAxis","guides","axisAlpha","label","chartScrollbar","scrollbarHeight","graph","resizeEnabled","gridAlpha","xy","valueyAxes","stock","dataSetSelector","position","periodSelector","selectText","compareText","periodsText","inputFieldsEnabled","map","zoomControl","zoomControlEnabled","smallMap","valueLegend","dataProvider","areas","descriptionWindowWidth","descriptionWindowRight","descriptionWindowTop","images","lines","descriptionWindowLeft","descriptionWindowHeight","isNullOrUndefined","obj","isArray","Object","prototype","toString","call","isObject","findArrayObjectById","arr","id","i","cloneWithoutPrototypes","slice","clone","property","hasOwnProperty","originalValueRetainerPrefix","noOriginalPropertyStub","overrideProperty","object","overrideValue","originalValueRetainerProperty","push","restoreOriginalProperty","originalValue","restoreOriginals","override","pop","redrawChart","dataChanged","marginsUpdated","zoomOutOnDataUpdate","validateNow","animateAgain","x","panels","applyConfig","current","currentValue","idPresentOnAllOverrideElements","k","correspondingCurrentElement","l","j","checkRules","width","divRealWidth","height","divRealHeight","rulesChanged","rules","rule","ruleMatches","minWidth","minHeight","key","gantt","addDefaultRules","concat","addListener"],"mappings":"AA4BAA,SAASC,eAAgB,SAAUC,GACjC,YAEA,IAA0BC,SAArBD,EAAME,YAA4BF,EAAME,WAAWC,SAAU,GAAQH,EAAME,WAAWE,WAAY,EAAvG,CAEA,GAAIC,GAAUL,EAAMK,QAAQC,MAAO,IACnC,MAAOD,EAAQE,OAAS,GAAOC,OAAQH,EAAS,IAAQ,GAAkC,IAA3BG,OAAQH,EAAS,KAAeG,OAAQH,EAAS,IAAQ,IAAxH,CAIA,GAAII,GAAIT,EAAME,UAEdO,GAAEN,OAAQ,EACVM,EAAEC,gBACFD,EAAEE,cAGkB,UAAfX,EAAMY,KACJ,EAAIZ,EAAMa,eAAeC,gBAC5BL,EAAEK,cAAgBd,EAAMa,eAAeC,cACvCd,EAAMa,eAAeC,cAAgB,GAGlCb,SAAcD,EAAMc,eAAmB,EAAId,EAAMc,gBACpDL,EAAEK,cAAgBd,EAAMc,cACxBd,EAAMc,cAAgB,EAK1B,IAAIC,IAKFC,MAMIC,SAAY,IACZC,eAAkB,OAClBC,WACEC,QACEhB,SAAW,MAIfa,SAAY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ACtIhD,EAAmBoD,EAAK5F,SAAc4F,EAAK5F,UAAW,GAAQ5C,EAAM4C,UAAW,GAAY4F,EAAK5F,UAAW,IAAWwC,EAAmBpF,EAAM4C,SAAY5C,EAAM4C,UAAW,MAC5KwC,EAAmBoD,EAAKtH,kBAAuBkE,EAAmBpF,EAAMoB,UAAagE,EAAmBpF,EAAMoB,OAAO4C,WAAchE,EAAMoB,OAAO4C,WAAawE,EAAKtH,eAEjKuH,GACErD,EAAmB3E,EAAEC,aAAcqF,MACtCtF,EAAEC,aAAcqF,IAAM,EACtBuC,GAAe,GAENlD,EAAmB3E,EAAEC,aAAcqF,MAC9CtF,EAAEC,aAAcqF,GAAM9F,OACtBqI,GAAe,GAInB,IAAMA,EAEJ,WADAhB,IAIFR,IAEA,KAAM,GAAI8B,KAAOnI,GAAEC,aACjB,GAAM6E,OAAOC,UAAUY,eAAeV,KAAMjF,EAAEC,aAAckI,KAItDxD,EAAmB3E,EAAEC,aAAckI,IAAU,CACjD,GAAKxD,EAAmB3E,EAAE8H,MAAOK,IAC/B,KAAM,oCAAsCA,CAE9CnB,GAAazH,EAAOS,EAAE8H,MAAOK,GAAMzH,WAKvC8F,KAGFlG,GAAS8H,MAAQ9H,EAASyB,OAEpB8C,EAAS7E,EAAE8H,OAEL9H,EAAEqI,mBAAoB,IAChCrI,EAAE8H,MAAQxH,EAAUf,EAAMY,MAAOmI,OAAQtI,EAAE8H,QAF3C9H,EAAE8H,MAAQxH,EAAUf,EAAMY,MAM5B2F,EAAkBvG,EAAO,sBAAuBA,EAAMoH,qBAEtDpH,EAAMgJ,YAAa,UAAWf,GAC9BjI,EAAMgJ,YAAa,OAAQf,OAExB,MAAO,SAAU,KAAM,SAAU,QAAS,QAAS,QAAS,QAAS","file":"responsive.min.js","sourceRoot":"./"} --------------------------------------------------------------------------------