Merge branch 'pie_chart_themeing' into state-diagram-themeing
This commit is contained in:
commit
785e5552ae
|
@ -23,6 +23,9 @@ A clear and concise description of what you expected to happen.
|
|||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Code Sample**
|
||||
If applicable, add the code sample or a link to the [live editor](https://mermaid-js.github.io/mermaid-live-editor).
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
|
|
|
@ -993,10 +993,11 @@ var roundedWithTitle = function roundedWithTitle(parent, node) {
|
|||
|
||||
bbox = text.getBBox();
|
||||
var padding = 0 * node.padding;
|
||||
var halfPadding = padding / 2; // center the rect around its coordinate
|
||||
var halfPadding = padding / 2;
|
||||
var width = node.width > bbox.width ? node.width : bbox.width + node.padding; // center the rect around its coordinate
|
||||
|
||||
rect.attr('class', 'outer').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding);
|
||||
innerRect.attr('class', 'inner').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', node.width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label
|
||||
rect.attr('class', 'outer').attr('x', node.x - width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', width + padding).attr('height', node.height + padding);
|
||||
innerRect.attr('class', 'inner').attr('x', node.x - width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label
|
||||
|
||||
label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 - node.padding / 3 + (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels ? 5 : 3)) + ')');
|
||||
var rectBox = rect.node().getBBox();
|
||||
|
@ -3931,7 +3932,7 @@ var config = {
|
|||
* call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to
|
||||
* the `secure` keys in the current currentConfig. This prevents malicious graph directives from
|
||||
* overriding a site's default security.
|
||||
* **Notes**:
|
||||
* **Notes**:
|
||||
*
|
||||
* Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']
|
||||
*/
|
||||
|
@ -16718,12 +16719,11 @@ var clear = function clear() {
|
|||
/*!*****************************************!*\
|
||||
!*** ./src/diagrams/pie/pieRenderer.js ***!
|
||||
\*****************************************/
|
||||
/*! exports provided: setConf, draw, default */
|
||||
/*! exports provided: draw, default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
||||
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
|
||||
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
||||
|
@ -16732,6 +16732,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
|
||||
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ "./src/config.js");
|
||||
/**
|
||||
* Created by AshishJ on 11-09-2019.
|
||||
*/
|
||||
|
@ -16740,13 +16741,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
var conf = {};
|
||||
var setConf = function setConf(cnf) {
|
||||
var keys = Object.keys(cnf);
|
||||
keys.forEach(function (key) {
|
||||
conf[key] = cnf[key];
|
||||
});
|
||||
};
|
||||
|
||||
var conf = _config__WEBPACK_IMPORTED_MODULE_5__["getConfig"]();
|
||||
/**
|
||||
* Draws a Pie Chart with the data given in text.
|
||||
* @param text
|
||||
|
@ -16757,6 +16753,7 @@ var width;
|
|||
var height = 450;
|
||||
var draw = function draw(txt, id) {
|
||||
try {
|
||||
conf = _config__WEBPACK_IMPORTED_MODULE_5__["getConfig"]();
|
||||
var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
|
||||
parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"];
|
||||
_logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Rendering info diagram\n' + txt); // Parse the Pie Chart definition
|
||||
|
@ -16789,9 +16786,11 @@ var draw = function draw(txt, id) {
|
|||
var sum = 0;
|
||||
Object.keys(data).forEach(function (key) {
|
||||
sum += data[key];
|
||||
}); // Set the color scale
|
||||
});
|
||||
var themeVariables = conf.themeVariables;
|
||||
var myGeneratedColors = [themeVariables.pie1, themeVariables.pie2, themeVariables.pie3, themeVariables.pie4, themeVariables.pie5, themeVariables.pie6, themeVariables.pie7, themeVariables.pie8, themeVariables.pie9, themeVariables.pie10, themeVariables.pie11, themeVariables.pie12]; // Set the color scale
|
||||
|
||||
var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"])().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__["schemeSet2"]); // Compute the position of each group on the pie:
|
||||
var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"])().domain(data).range(myGeneratedColors); // Compute the position of each group on the pie:
|
||||
|
||||
var pie = Object(d3__WEBPACK_IMPORTED_MODULE_0__["pie"])().value(function (d) {
|
||||
return d.value;
|
||||
|
@ -16831,7 +16830,6 @@ var draw = function draw(txt, id) {
|
|||
}
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||
setConf: setConf,
|
||||
draw: draw
|
||||
});
|
||||
|
||||
|
@ -25334,8 +25332,8 @@ var render = function render(id, _txt, cb, container) {
|
|||
break;
|
||||
|
||||
case 'pie':
|
||||
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||
_diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(cnf.pie);
|
||||
//cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||
//pieRenderer.setConf(cnf.pie);
|
||||
_diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
|
||||
break;
|
||||
|
||||
|
@ -25498,8 +25496,8 @@ function updateRendererConfigs(conf) {
|
|||
_diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].setConf(conf.class);
|
||||
_diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].setConf(conf.state);
|
||||
_diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_36__["default"].setConf(conf.state);
|
||||
_diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__["default"].setConf(conf.class);
|
||||
_diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(conf.class);
|
||||
_diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__["default"].setConf(conf.class); // pieRenderer.setConf(conf.class);
|
||||
|
||||
_diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(conf.er);
|
||||
_diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].setConf(conf.journey);
|
||||
_diagrams_requirement_requirementRenderer__WEBPACK_IMPORTED_MODULE_29__["default"].setConf(conf.requirement);
|
||||
|
@ -25903,6 +25901,44 @@ function () {
|
|||
this.fillType7 = this.fillType7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -10
|
||||
});
|
||||
this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -10
|
||||
});
|
||||
this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: 0
|
||||
});
|
||||
this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -20
|
||||
});
|
||||
this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -20
|
||||
});
|
||||
this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -10
|
||||
});
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
@ -26124,6 +26160,32 @@ function () {
|
|||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
// this.pie1 = this.pie1 || this.primaryColor;
|
||||
// this.pie2 = this.pie2 || this.secondaryColor;
|
||||
// this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
// this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });
|
||||
// this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
// this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
// this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
// this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
// this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
// this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
// this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
// this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
this.pie1 = this.pie1 || '#0b0000';
|
||||
this.pie2 = this.pie2 || '#4d1037';
|
||||
this.pie3 = this.pie3 || '#3f5258';
|
||||
this.pie4 = this.pie4 || '#4f2f1b';
|
||||
this.pie5 = this.pie5 || '#6e0a0a';
|
||||
this.pie6 = this.pie6 || '#3b0048';
|
||||
this.pie7 = this.pie7 || '#995a01';
|
||||
this.pie8 = this.pie8 || '#154706';
|
||||
this.pie9 = this.pie9 || '#161722';
|
||||
this.pie10 = this.pie10 || '#00296f';
|
||||
this.pie11 = this.pie11 || '#01629c';
|
||||
this.pie12 = this.pie12 || '#010029';
|
||||
/* class */
|
||||
|
||||
this.classText = this.primaryTextColor;
|
||||
|
@ -26362,6 +26424,46 @@ function () {
|
|||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
l: -40
|
||||
});
|
||||
this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
l: -30
|
||||
});
|
||||
this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
l: -20
|
||||
});
|
||||
this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -20
|
||||
});
|
||||
this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -40
|
||||
});
|
||||
this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -40
|
||||
});
|
||||
this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -40
|
||||
});
|
||||
this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -90,
|
||||
l: -40
|
||||
});
|
||||
this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -30
|
||||
});
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
@ -26566,6 +26668,45 @@ function () {
|
|||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
l: -30
|
||||
});
|
||||
this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
l: -30
|
||||
});
|
||||
this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
h: +40,
|
||||
l: -40
|
||||
});
|
||||
this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -10
|
||||
});
|
||||
this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -10
|
||||
});
|
||||
this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: 0
|
||||
});
|
||||
this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -50
|
||||
});
|
||||
this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -50
|
||||
});
|
||||
this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -50
|
||||
});
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
@ -26823,7 +26964,32 @@ function () {
|
|||
});
|
||||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
}); // /* pie */
|
||||
|
||||
this.pie1 = this.pie1 || '#F4F4F4';
|
||||
this.pie2 = this.pie2 || '#555';
|
||||
this.pie3 = this.pie3 || '#BBB';
|
||||
this.pie4 = this.pie4 || '#777';
|
||||
this.pie5 = this.pie5 || '#999';
|
||||
this.pie6 = this.pie6 || '#DDD';
|
||||
this.pie7 = this.pie7 || '#FFF';
|
||||
this.pie8 = this.pie8 || '#DDD';
|
||||
this.pie9 = this.pie9 || '#BBB';
|
||||
this.pie10 = this.pie10 || '#999';
|
||||
this.pie11 = this.pie11 || '#777';
|
||||
this.pie12 = this.pie12 || '#555'; // this.pie1 = this.pie1 || '#212529';
|
||||
// this.pie2 = this.pie2 || '#343A40';
|
||||
// this.pie3 = this.pie3 || '#495057';
|
||||
// this.pie4 = this.pie4 || '#6C757D';
|
||||
// this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
// this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
// this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
// this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
// this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
// this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
// this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
// this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -30304,7 +30304,7 @@ function addHtmlLabel(root, node) {
|
|||
var client = div.node().getBoundingClientRect();
|
||||
fo
|
||||
.attr("width", client.width)
|
||||
.attr("height", client.height);
|
||||
.attr("height", client.height);
|
||||
|
||||
return fo;
|
||||
}
|
||||
|
@ -49371,10 +49371,11 @@ var roundedWithTitle = function roundedWithTitle(parent, node) {
|
|||
|
||||
bbox = text.getBBox();
|
||||
var padding = 0 * node.padding;
|
||||
var halfPadding = padding / 2; // center the rect around its coordinate
|
||||
var halfPadding = padding / 2;
|
||||
var width = node.width > bbox.width ? node.width : bbox.width + node.padding; // center the rect around its coordinate
|
||||
|
||||
rect.attr('class', 'outer').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding);
|
||||
innerRect.attr('class', 'inner').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', node.width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label
|
||||
rect.attr('class', 'outer').attr('x', node.x - width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', width + padding).attr('height', node.height + padding);
|
||||
innerRect.attr('class', 'inner').attr('x', node.x - width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label
|
||||
|
||||
label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 - node.padding / 3 + (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels ? 5 : 3)) + ')');
|
||||
var rectBox = rect.node().getBBox();
|
||||
|
@ -52305,7 +52306,7 @@ var config = {
|
|||
* call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to
|
||||
* the `secure` keys in the current currentConfig. This prevents malicious graph directives from
|
||||
* overriding a site's default security.
|
||||
* **Notes**:
|
||||
* **Notes**:
|
||||
*
|
||||
* Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']
|
||||
*/
|
||||
|
@ -65081,12 +65082,11 @@ var clear = function clear() {
|
|||
/*!*****************************************!*\
|
||||
!*** ./src/diagrams/pie/pieRenderer.js ***!
|
||||
\*****************************************/
|
||||
/*! exports provided: setConf, draw, default */
|
||||
/*! exports provided: draw, default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
||||
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
|
||||
/* harmony import */ var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieDb */ "./src/diagrams/pie/pieDb.js");
|
||||
|
@ -65094,6 +65094,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
|
||||
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ "./src/config.js");
|
||||
/**
|
||||
* Created by AshishJ on 11-09-2019.
|
||||
*/
|
||||
|
@ -65102,13 +65103,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
var conf = {};
|
||||
var setConf = function setConf(cnf) {
|
||||
var keys = Object.keys(cnf);
|
||||
keys.forEach(function (key) {
|
||||
conf[key] = cnf[key];
|
||||
});
|
||||
};
|
||||
|
||||
var conf = _config__WEBPACK_IMPORTED_MODULE_5__["getConfig"]();
|
||||
/**
|
||||
* Draws a Pie Chart with the data given in text.
|
||||
* @param text
|
||||
|
@ -65119,6 +65115,7 @@ var width;
|
|||
var height = 450;
|
||||
var draw = function draw(txt, id) {
|
||||
try {
|
||||
conf = _config__WEBPACK_IMPORTED_MODULE_5__["getConfig"]();
|
||||
var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
|
||||
parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"];
|
||||
_logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Rendering info diagram\n' + txt); // Parse the Pie Chart definition
|
||||
|
@ -65151,9 +65148,11 @@ var draw = function draw(txt, id) {
|
|||
var sum = 0;
|
||||
Object.keys(data).forEach(function (key) {
|
||||
sum += data[key];
|
||||
}); // Set the color scale
|
||||
});
|
||||
var themeVariables = conf.themeVariables;
|
||||
var myGeneratedColors = [themeVariables.pie1, themeVariables.pie2, themeVariables.pie3, themeVariables.pie4, themeVariables.pie5, themeVariables.pie6, themeVariables.pie7, themeVariables.pie8, themeVariables.pie9, themeVariables.pie10, themeVariables.pie11, themeVariables.pie12]; // Set the color scale
|
||||
|
||||
var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"])().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__["schemeSet2"]); // Compute the position of each group on the pie:
|
||||
var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"])().domain(data).range(myGeneratedColors); // Compute the position of each group on the pie:
|
||||
|
||||
var pie = Object(d3__WEBPACK_IMPORTED_MODULE_0__["pie"])().value(function (d) {
|
||||
return d.value;
|
||||
|
@ -65193,7 +65192,6 @@ var draw = function draw(txt, id) {
|
|||
}
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||
setConf: setConf,
|
||||
draw: draw
|
||||
});
|
||||
|
||||
|
@ -73686,8 +73684,8 @@ var render = function render(id, _txt, cb, container) {
|
|||
break;
|
||||
|
||||
case 'pie':
|
||||
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||
_diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(cnf.pie);
|
||||
//cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||
//pieRenderer.setConf(cnf.pie);
|
||||
_diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
|
||||
break;
|
||||
|
||||
|
@ -73850,8 +73848,8 @@ function updateRendererConfigs(conf) {
|
|||
_diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].setConf(conf.class);
|
||||
_diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].setConf(conf.state);
|
||||
_diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_36__["default"].setConf(conf.state);
|
||||
_diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__["default"].setConf(conf.class);
|
||||
_diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(conf.class);
|
||||
_diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_22__["default"].setConf(conf.class); // pieRenderer.setConf(conf.class);
|
||||
|
||||
_diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(conf.er);
|
||||
_diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].setConf(conf.journey);
|
||||
_diagrams_requirement_requirementRenderer__WEBPACK_IMPORTED_MODULE_29__["default"].setConf(conf.requirement);
|
||||
|
@ -74255,6 +74253,44 @@ function () {
|
|||
this.fillType7 = this.fillType7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -10
|
||||
});
|
||||
this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -10
|
||||
});
|
||||
this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: 0
|
||||
});
|
||||
this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -20
|
||||
});
|
||||
this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -20
|
||||
});
|
||||
this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -10
|
||||
});
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
@ -74476,6 +74512,32 @@ function () {
|
|||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
// this.pie1 = this.pie1 || this.primaryColor;
|
||||
// this.pie2 = this.pie2 || this.secondaryColor;
|
||||
// this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
// this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });
|
||||
// this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
// this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
// this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
// this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
// this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
// this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
// this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
// this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
this.pie1 = this.pie1 || '#0b0000';
|
||||
this.pie2 = this.pie2 || '#4d1037';
|
||||
this.pie3 = this.pie3 || '#3f5258';
|
||||
this.pie4 = this.pie4 || '#4f2f1b';
|
||||
this.pie5 = this.pie5 || '#6e0a0a';
|
||||
this.pie6 = this.pie6 || '#3b0048';
|
||||
this.pie7 = this.pie7 || '#995a01';
|
||||
this.pie8 = this.pie8 || '#154706';
|
||||
this.pie9 = this.pie9 || '#161722';
|
||||
this.pie10 = this.pie10 || '#00296f';
|
||||
this.pie11 = this.pie11 || '#01629c';
|
||||
this.pie12 = this.pie12 || '#010029';
|
||||
/* class */
|
||||
|
||||
this.classText = this.primaryTextColor;
|
||||
|
@ -74714,6 +74776,46 @@ function () {
|
|||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
l: -40
|
||||
});
|
||||
this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
l: -10
|
||||
});
|
||||
this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
l: -30
|
||||
});
|
||||
this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
l: -20
|
||||
});
|
||||
this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -20
|
||||
});
|
||||
this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -40
|
||||
});
|
||||
this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -40
|
||||
});
|
||||
this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -40
|
||||
});
|
||||
this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -90,
|
||||
l: -40
|
||||
});
|
||||
this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -30
|
||||
});
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
@ -74918,6 +75020,45 @@ function () {
|
|||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
/* pie */
|
||||
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
this.pie4 = this.pie4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
l: -30
|
||||
});
|
||||
this.pie5 = this.pie5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
l: -30
|
||||
});
|
||||
this.pie6 = this.pie6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.tertiaryColor, {
|
||||
h: +40,
|
||||
l: -40
|
||||
});
|
||||
this.pie7 = this.pie7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -10
|
||||
});
|
||||
this.pie8 = this.pie8 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -10
|
||||
});
|
||||
this.pie9 = this.pie9 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: 0
|
||||
});
|
||||
this.pie10 = this.pie10 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: +60,
|
||||
l: -50
|
||||
});
|
||||
this.pie11 = this.pie11 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: -60,
|
||||
l: -50
|
||||
});
|
||||
this.pie12 = this.pie12 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
|
||||
h: 120,
|
||||
l: -50
|
||||
});
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
@ -75175,7 +75316,32 @@ function () {
|
|||
});
|
||||
this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
|
||||
h: 128
|
||||
});
|
||||
}); // /* pie */
|
||||
|
||||
this.pie1 = this.pie1 || '#F4F4F4';
|
||||
this.pie2 = this.pie2 || '#555';
|
||||
this.pie3 = this.pie3 || '#BBB';
|
||||
this.pie4 = this.pie4 || '#777';
|
||||
this.pie5 = this.pie5 || '#999';
|
||||
this.pie6 = this.pie6 || '#DDD';
|
||||
this.pie7 = this.pie7 || '#FFF';
|
||||
this.pie8 = this.pie8 || '#DDD';
|
||||
this.pie9 = this.pie9 || '#BBB';
|
||||
this.pie10 = this.pie10 || '#999';
|
||||
this.pie11 = this.pie11 || '#777';
|
||||
this.pie12 = this.pie12 || '#555'; // this.pie1 = this.pie1 || '#212529';
|
||||
// this.pie2 = this.pie2 || '#343A40';
|
||||
// this.pie3 = this.pie3 || '#495057';
|
||||
// this.pie4 = this.pie4 || '#6C757D';
|
||||
// this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
// this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
// this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
// this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
// this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
// this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
// this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
// this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
/* requirement-diagram */
|
||||
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
- Introduction 📊
|
||||
- Introduction 📔
|
||||
|
||||
- [About mermaid](README.md)
|
||||
- [Simple start to write diagrams](n00b-gettingStarted.md)
|
||||
|
@ -18,7 +18,7 @@
|
|||
- [Requirement Diagram](requirementDiagram.md)
|
||||
- [Other Examples](examples.md)
|
||||
|
||||
- Adding mermaid✒️
|
||||
- Deployment and Configuration⚙️
|
||||
|
||||
- [Tutorials](Tutorials.md)
|
||||
- [API-Usage](usage.md)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 25 KiB |
|
@ -514,7 +514,7 @@ text.actor {
|
|||
Is it possible to adjust the margins for rendering the sequence diagram.
|
||||
|
||||
This is done by defining `mermaid.sequenceConfig` or by the CLI to use a json file with the configuration.
|
||||
How to use the CLI is described in the [mermaidCLI](mermaidCLI.html) page.
|
||||
How to use the CLI is described in the [mermaidCLI](mermaidCLI) page.
|
||||
`mermaid.sequenceConfig` can be set to a JSON string with config parameters or the corresponding object.
|
||||
|
||||
```javascript
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
/**
|
||||
* Created by AshishJ on 11-09-2019.
|
||||
*/
|
||||
import { select, scaleOrdinal, schemeSet2, pie as d3pie, entries, arc } from 'd3';
|
||||
import { select, scaleOrdinal, pie as d3pie, entries, arc } from 'd3';
|
||||
import pieData from './pieDb';
|
||||
import pieParser from './parser/pie';
|
||||
import { log } from '../../logger';
|
||||
import { configureSvgSize } from '../../utils';
|
||||
import * as configApi from '../../config';
|
||||
|
||||
const conf = {};
|
||||
export const setConf = function(cnf) {
|
||||
const keys = Object.keys(cnf);
|
||||
|
||||
keys.forEach(function(key) {
|
||||
conf[key] = cnf[key];
|
||||
});
|
||||
};
|
||||
let conf = configApi.getConfig();
|
||||
|
||||
/**
|
||||
* Draws a Pie Chart with the data given in text.
|
||||
|
@ -25,6 +19,7 @@ let width;
|
|||
const height = 450;
|
||||
export const draw = (txt, id) => {
|
||||
try {
|
||||
conf = configApi.getConfig();
|
||||
const parser = pieParser.parser;
|
||||
parser.yy = pieData;
|
||||
log.debug('Rendering info diagram\n' + txt);
|
||||
|
@ -39,12 +34,12 @@ export const draw = (txt, id) => {
|
|||
width = 1200;
|
||||
}
|
||||
|
||||
if (typeof conf.useWidth !== 'undefined') {
|
||||
if (typeof conf.pie.useWidth !== 'undefined') {
|
||||
width = conf.useWidth;
|
||||
}
|
||||
|
||||
const diagram = select('#' + id);
|
||||
configureSvgSize(diagram, height, width, conf.useMaxWidth);
|
||||
configureSvgSize(diagram, height, width, conf.pie.useMaxWidth);
|
||||
|
||||
// Set viewBox
|
||||
elem.setAttribute('viewBox', '0 0 ' + width + ' ' + height);
|
||||
|
@ -66,10 +61,26 @@ export const draw = (txt, id) => {
|
|||
sum += data[key];
|
||||
});
|
||||
|
||||
const themeVariables = conf.themeVariables;
|
||||
var myGeneratedColors = [
|
||||
themeVariables.pie1,
|
||||
themeVariables.pie2,
|
||||
themeVariables.pie3,
|
||||
themeVariables.pie4,
|
||||
themeVariables.pie5,
|
||||
themeVariables.pie6,
|
||||
themeVariables.pie7,
|
||||
themeVariables.pie8,
|
||||
themeVariables.pie9,
|
||||
themeVariables.pie10,
|
||||
themeVariables.pie11,
|
||||
themeVariables.pie12
|
||||
];
|
||||
|
||||
// Set the color scale
|
||||
var color = scaleOrdinal()
|
||||
.domain(data)
|
||||
.range(schemeSet2);
|
||||
.range(myGeneratedColors);
|
||||
|
||||
// Compute the position of each group on the pie:
|
||||
var pie = d3pie().value(function(d) {
|
||||
|
@ -156,6 +167,5 @@ export const draw = (txt, id) => {
|
|||
};
|
||||
|
||||
export default {
|
||||
setConf,
|
||||
draw
|
||||
};
|
||||
|
|
|
@ -414,8 +414,8 @@ const render = function(id, _txt, cb, container) {
|
|||
infoRenderer.draw(txt, id, pkg.version);
|
||||
break;
|
||||
case 'pie':
|
||||
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||
pieRenderer.setConf(cnf.pie);
|
||||
//cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||
//pieRenderer.setConf(cnf.pie);
|
||||
pieRenderer.draw(txt, id, pkg.version);
|
||||
break;
|
||||
case 'er':
|
||||
|
@ -574,7 +574,7 @@ function updateRendererConfigs(conf) {
|
|||
stateRenderer.setConf(conf.state);
|
||||
stateRendererV2.setConf(conf.state);
|
||||
infoRenderer.setConf(conf.class);
|
||||
pieRenderer.setConf(conf.class);
|
||||
// pieRenderer.setConf(conf.class);
|
||||
erRenderer.setConf(conf.er);
|
||||
journeyRenderer.setConf(conf.journey);
|
||||
requirementRenderer.setConf(conf.requirement);
|
||||
|
|
|
@ -134,6 +134,20 @@ class Theme {
|
|||
this.fillType6 = this.fillType6 || adjust(this.primaryColor, { h: 128 });
|
||||
this.fillType7 = this.fillType7 || adjust(this.secondaryColor, { h: 128 });
|
||||
|
||||
/* pie */
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });
|
||||
this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
/* requirement-diagram */
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
||||
|
|
|
@ -138,6 +138,34 @@ class Theme {
|
|||
this.fillType5 = adjust(this.secondaryColor, { h: -64 });
|
||||
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||
|
||||
/* pie */
|
||||
// this.pie1 = this.pie1 || this.primaryColor;
|
||||
// this.pie2 = this.pie2 || this.secondaryColor;
|
||||
// this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
// this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });
|
||||
// this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
// this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
// this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
// this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
// this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
// this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
// this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
// this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
this.pie1 = this.pie1 || '#0b0000';
|
||||
this.pie2 = this.pie2 || '#4d1037';
|
||||
this.pie3 = this.pie3 || '#3f5258';
|
||||
this.pie4 = this.pie4 || '#4f2f1b';
|
||||
this.pie5 = this.pie5 || '#6e0a0a';
|
||||
this.pie6 = this.pie6 || '#3b0048';
|
||||
this.pie7 = this.pie7 || '#995a01';
|
||||
this.pie8 = this.pie8 || '#154706';
|
||||
this.pie9 = this.pie9 || '#161722';
|
||||
this.pie10 = this.pie10 || '#00296f';
|
||||
this.pie11 = this.pie11 || '#01629c';
|
||||
this.pie12 = this.pie12 || '#010029';
|
||||
|
||||
/* class */
|
||||
this.classText = this.primaryTextColor;
|
||||
|
||||
|
|
|
@ -151,6 +151,20 @@ class Theme {
|
|||
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||
|
||||
/* pie */
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || adjust(this.tertiaryColor, { l: -40 });
|
||||
this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });
|
||||
this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });
|
||||
this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -20 });
|
||||
this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -40 });
|
||||
this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: -40 });
|
||||
this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -40 });
|
||||
this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -90, l: -40 });
|
||||
this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -30 });
|
||||
|
||||
/* requirement-diagram */
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
||||
|
|
|
@ -121,6 +121,19 @@ class Theme {
|
|||
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||
|
||||
/* pie */
|
||||
this.pie1 = this.pie1 || this.primaryColor;
|
||||
this.pie2 = this.pie2 || this.secondaryColor;
|
||||
this.pie3 = this.pie3 || this.tertiaryColor;
|
||||
this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -30 });
|
||||
this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });
|
||||
this.pie6 = this.pie6 || adjust(this.tertiaryColor, { h: +40, l: -40 });
|
||||
this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -50 });
|
||||
this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -50 });
|
||||
this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -50 });
|
||||
/* requirement-diagram */
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
||||
|
|
|
@ -157,6 +157,34 @@ class Theme {
|
|||
this.fillType5 = adjust(this.secondaryColor, { h: -64 });
|
||||
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||
|
||||
// /* pie */
|
||||
this.pie1 = this.pie1 || '#F4F4F4';
|
||||
this.pie2 = this.pie2 || '#555';
|
||||
this.pie3 = this.pie3 || '#BBB';
|
||||
this.pie4 = this.pie4 || '#777';
|
||||
this.pie5 = this.pie5 || '#999';
|
||||
this.pie6 = this.pie6 || '#DDD';
|
||||
this.pie7 = this.pie7 || '#FFF';
|
||||
this.pie8 = this.pie8 || '#DDD';
|
||||
this.pie9 = this.pie9 || '#BBB';
|
||||
this.pie10 = this.pie10 || '#999';
|
||||
this.pie11 = this.pie11 || '#777';
|
||||
this.pie12 = this.pie12 || '#555';
|
||||
|
||||
// this.pie1 = this.pie1 || '#212529';
|
||||
// this.pie2 = this.pie2 || '#343A40';
|
||||
// this.pie3 = this.pie3 || '#495057';
|
||||
// this.pie4 = this.pie4 || '#6C757D';
|
||||
// this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });
|
||||
// this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });
|
||||
// this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });
|
||||
// this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });
|
||||
// this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });
|
||||
// this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });
|
||||
// this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });
|
||||
// this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });
|
||||
|
||||
/* requirement-diagram */
|
||||
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
||||
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
||||
|
|
Loading…
Reference in New Issue