mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
fix: PR comment and updated test case
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -161,7 +161,7 @@ describe('pie', () => {
|
||||
"rats" : 40.12
|
||||
`);
|
||||
}).rejects.toThrowError(
|
||||
'"dogs" has invalid value: -60.67.Negative values are not allowed in pie charts. All slice values must be > 0'
|
||||
'"dogs" has invalid value: -60.67. Negative values are not allowed in pie charts. All slice values must be >= 0.'
|
||||
);
|
||||
});
|
||||
|
||||
|
@@ -36,7 +36,7 @@ const clear = (): void => {
|
||||
const addSection = ({ label, value }: D3Section): void => {
|
||||
if (value < 0) {
|
||||
throw new Error(
|
||||
`"${label}" has invalid value: ${value}.Negative values are not allowed in pie charts. All slice values must be > 0.`
|
||||
`"${label}" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
||||
);
|
||||
}
|
||||
if (!sections.has(label)) {
|
||||
|
Reference in New Issue
Block a user