MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / parsePercent

Function parsePercent

libs/echarts/echarts.simple.js:8915–8923  ·  view source on GitHub ↗
(value, maxValue)

Source from the content-addressed store, hash-verified

8913}
8914
8915function parsePercent(value, maxValue) {
8916 if (typeof value === 'string') {
8917 if (value.lastIndexOf('%') >= 0) {
8918 return parseFloat(value) / 100 * maxValue;
8919 }
8920 return parseFloat(value);
8921 }
8922 return value;
8923}
8924
8925function getTextXForPadding(x, textAlign, textPadding) {
8926 return textAlign === 'right'

Callers 1

getBoxPositionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected