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.
svg
.selectAll('mySlices')
.data(dataReady)
.data(dataReady.filter(value => value.data.value !== 0))
.enter()
.append('text')
.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);
// Fix for when the br tag is used
svgCode = svgCode.replace(/<br>/g, '<br/>');
if (typeof cb !== 'undefined') {
switch (graphType) {
case 'flowchart':