Merge branch 'develop' of github.com:mermaid-js/mermaid into develop

This commit is contained in:
Knut Sveidqvist 2020-12-17 20:50:41 +01:00
commit e08ae8ed4a
2 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,7 @@ export const draw = (txt, id) => {
// Use the centroid method to get the best coordinates. // Use the centroid method to get the best coordinates.
svg svg
.selectAll('mySlices') .selectAll('mySlices')
.data(dataReady) .data(dataReady.filter(value => value.data.value !== 0))
.enter() .enter()
.append('text') .append('text')
.text(function(d) { .text(function(d) {

3
src/mermaidAPI.js Normal file → Executable file
View File

@ -430,6 +430,9 @@ const render = function(id, _txt, cb, container) {
svgCode = decodeEntities(svgCode); svgCode = decodeEntities(svgCode);
// Fix for when the br tag is used
svgCode = svgCode.replace(/<br>/g, '<br/>');
if (typeof cb !== 'undefined') { if (typeof cb !== 'undefined') {
switch (graphType) { switch (graphType) {
case 'flowchart': case 'flowchart':