Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) remove console stmt in pieDetector #3840

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/mermaid/src/diagrams/pie/pieDetector.ts
Expand Up @@ -2,6 +2,5 @@ import type { DiagramDetector } from '../../diagram-api/types';

export const pieDetector: DiagramDetector = (txt) => {
const logOutput = txt.match(/^\s*pie/) !== null || txt.match(/^\s*bar/) !== null;
console.log(logOutput);
return logOutput;
};
16 changes: 8 additions & 8 deletions packages/mermaid/src/diagrams/pie/pieRenderer.js
Expand Up @@ -161,9 +161,9 @@ let conf = configApi.getConfig();
// .attr('transform', function (d, i) {
// var height = legendRectSize + legendSpacing;
// var offset = (height * color.domain().length) / 2;
// var horz = 12 * legendRectSize;
// var vert = i * height - offset;
// return 'translate(' + horz + ',' + vert + ')';
// var horizontal = 12 * legendRectSize;
// var vertical = i * height - offset;
// return 'translate(' + horizontal + ',' + vertical + ')';
// });

// legend
Expand Down Expand Up @@ -337,11 +337,11 @@ export const draw = (txt, id, _version, diagObj) => {
.append('g')
.attr('class', 'legend')
.attr('transform', function (d, i) {
var height = legendRectSize + legendSpacing;
var offset = (height * color.domain().length) / 2;
var horz = 12 * legendRectSize;
var vert = i * height - offset;
return 'translate(' + horz + ',' + vert + ')';
const height = legendRectSize + legendSpacing;
const offset = (height * color.domain().length) / 2;
const horizontal = 12 * legendRectSize;
const vertical = i * height - offset;
return 'translate(' + horizontal + ',' + vertical + ')';
});

legend
Expand Down