Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

app-bulle.08404383.js 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["app-bulle"],{
  2. /***/ "./assets/app/frontend/js/bulle.js":
  3. /*!*****************************************!*\
  4. !*** ./assets/app/frontend/js/bulle.js ***!
  5. \*****************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
  10. /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
  11. /* harmony import */ var _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @amcharts/amcharts4/core */ "./node_modules/@amcharts/amcharts4/core.js");
  12. /* harmony import */ var _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @amcharts/amcharts4/charts */ "./node_modules/@amcharts/amcharts4/charts.js");
  13. /* harmony import */ var _amcharts_amcharts4_plugins_forceDirected__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @amcharts/amcharts4/plugins/forceDirected */ "./node_modules/@amcharts/amcharts4/plugins/forceDirected.js");
  14. // Create chart
  15. var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create("carto-bulles", _amcharts_amcharts4_plugins_forceDirected__WEBPACK_IMPORTED_MODULE_3__.ForceDirectedTree); // Create series
  16. var series = chart.series.push(new _amcharts_amcharts4_plugins_forceDirected__WEBPACK_IMPORTED_MODULE_3__.ForceDirectedSeries());
  17. series.dataSource.url = routes.app_carto_json; // Set data
  18. // series.data = [{
  19. // "name": "Nos révoltes",
  20. // "link": ["Nos rêves"],
  21. // "children": [{
  22. // "name": "A1", "value": 100
  23. // }, {
  24. // "name": "A2", "value": 60
  25. // }, {
  26. // "name": "A3", "value": 30
  27. // }]
  28. // }, {
  29. // "name": "Nos rêves",
  30. // "link": ["Les actions \n inspirantes"],
  31. // "children": [{
  32. // "name": "B1", "value": 135
  33. // }, {
  34. // "name": "B2", "value": 98
  35. // }, {
  36. // "name": "B3", "value": 56
  37. // }]
  38. // }, {
  39. // "name": "Les actions \n inspirantes",
  40. // "link": ["Les actions \n à booster"],
  41. // "children": [{
  42. // "name": "C1", "value": 335
  43. // }, {
  44. // "name": "C2", "value": 148
  45. // }, {
  46. // "name": "C3", "value": 126
  47. // }, {
  48. // "name": "C4", "value": 26
  49. // }]
  50. // }, {
  51. // "name": "Les actions \n à booster",
  52. // "link": ["Nos révoltes"],
  53. // "children": [{
  54. // "name": "D1", "value": 415
  55. // }, {
  56. // "name": "D2", "value": 148
  57. // }, {
  58. // "name": "D3", "value": 89
  59. // }, {
  60. // "name": "D4", "value": 64
  61. // }, {
  62. // "name": "D5", "value": 16
  63. // }]
  64. // }];
  65. series.nodes.template.events.on("hit", function (event) {
  66. console.log(event.target.dataItem.nb);
  67. });
  68. series.manyBodyStrength = -25;
  69. series.links.template.strength = 2;
  70. series.centerStrength = 1.2; //active le zoom
  71. chart.zoomable = true; //Nombre de level affiché par défaut
  72. series.maxLevels = 1; //link entre "frere"
  73. // series.dataFields.id = "name";
  74. // series.dataFields.linkWith = "link";
  75. //distance entre les bulles
  76. series.links.template.distance = 1.7; // Set up data fields
  77. series.dataFields.name = "name";
  78. series.dataFields.children = "children";
  79. series.dataFields.nb = "nb"; // Add labels
  80. series.nodes.template.label.text = "{name}";
  81. series.fontSize = 20;
  82. series.minRadius = 70;
  83. series.maxRadius = 100; //Couleur des bulles
  84. series.colors.list = [_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color("#dc5b2f"), _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color("#fce767"), _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color("#97533a"), _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color("#568b6f")]; //Apparence des liens entre les bulles
  85. series.links.template.strokeWidth = 5;
  86. series.links.template.strokeOpacity = 1; //tooltip
  87. series.nodes.template.tooltipText = "{nb}";
  88. /***/ })
  89. },
  90. /******/ __webpack_require__ => { // webpackRuntimeModules
  91. /******/ "use strict";
  92. /******/
  93. /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
  94. /******/ __webpack_require__.O(0, ["vendors-node_modules_amcharts_amcharts4_charts_js-node_modules_amcharts_amcharts4_core_js-nod-e7c189"], () => (__webpack_exec__("./assets/app/frontend/js/bulle.js")));
  95. /******/ var __webpack_exports__ = __webpack_require__.O();
  96. /******/ }
  97. ]);
  98. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvYXBwL2Zyb250ZW5kL2pzL2J1bGxlLmpzIl0sIm5hbWVzIjpbImNoYXJ0IiwiYW00Y29yZSIsImFtNHBsdWdpbnNfZm9yY2VEaXJlY3RlZCIsInNlcmllcyIsInB1c2giLCJkYXRhU291cmNlIiwidXJsIiwicm91dGVzIiwiYXBwX2NhcnRvX2pzb24iLCJub2RlcyIsInRlbXBsYXRlIiwiZXZlbnRzIiwib24iLCJldmVudCIsImNvbnNvbGUiLCJsb2ciLCJ0YXJnZXQiLCJkYXRhSXRlbSIsIm5iIiwibWFueUJvZHlTdHJlbmd0aCIsImxpbmtzIiwic3RyZW5ndGgiLCJjZW50ZXJTdHJlbmd0aCIsInpvb21hYmxlIiwibW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