wip
This commit is contained in:
parent
70ac56522f
commit
a806bd87bf
|
@ -4,7 +4,7 @@
|
|||
|
||||
<Subject heading="Text as Numbers">
|
||||
<Section>
|
||||
Text can be used in place of numbers in certain scenarios, but care needs to be taken, as text that doesn't contain a strictly base-ten, non-decimal value may lead to unexpected behavior.
|
||||
Text can be used in place of numbers in certain scenarios, but care needs to be taken, as text that doesn't contain a strictly base-ten integer or decimal value may lead to unexpected behavior.
|
||||
</Section>
|
||||
|
||||
<Section>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<br />
|
||||
<Block>"100 million"</Block>{" -> "}<Block>100</Block>
|
||||
<br />
|
||||
<Block>"100.9"</Block>{" -> "}<Block>100</Block>
|
||||
<Block>"100.9"</Block>{" -> "}<Block>100.9</Block>
|
||||
<br />
|
||||
<Block>"One hundred"</Block>{" -> "}<Block>Error</Block>
|
||||
</Section>
|
||||
|
|
|
@ -80,7 +80,13 @@
|
|||
.colors(customColor ? colors : null)
|
||||
|
||||
// Add data if valid datasource
|
||||
const series = data.map(row => parseFloat(row[valueColumn]))
|
||||
const series = data.map(row => {
|
||||
if (schema[valueColumn].type === 'datetime') {
|
||||
return Date.parse(row[valueColumn])
|
||||
}
|
||||
|
||||
return parseFloat(row[valueColumn])
|
||||
})
|
||||
const labels = data.map(row => row[labelColumn])
|
||||
builder = builder.series(series).labels(labels)
|
||||
|
||||
|
|
Loading…
Reference in New Issue