1
0
Fork 0
mirror of synced 2024-09-10 06:26:02 +12:00
This commit is contained in:
Gerard Burns 2024-04-12 09:41:31 +01:00
parent 4a80af1bc6
commit fcca165a2e
4 changed files with 14 additions and 1 deletions

View file

@ -157,6 +157,8 @@
border-radius: 5px;
box-sizing: border-box;
opacity: 0;
overflow: hidden;
border: 1px solid var(--grey-4);
transition: width 300ms ease-in, height 300ms ease-in, top 300ms ease-in, left 300ms ease-in;

View file

@ -64,6 +64,11 @@
{setExplanationSubject}
/>
{/if}
{#if messages.includes(messageConstants.chartDatetime)}
<JSONPrimitivesOnly
{setExplanationSubject}
/>
{/if}
</div>

View file

@ -7,6 +7,7 @@
const punctuation = [" ", ",", "."]
// TODO regex might work here now
const getWords = (value) => {
if (typeof value !== "string") {
return [];
@ -37,7 +38,6 @@
}
$: words = getWords(value)
$: console.log(words);
</script>
{#if words.length}

View file

@ -97,12 +97,14 @@
// Add data
let useDates = false
if (schema[labelColumn]) {
console.log("in here?");
const labelFieldType = schema[labelColumn].type
if (horizontal) {
builder = builder.yType(labelFieldType).xUnits(yAxisUnits)
} else {
builder = builder.xType(labelFieldType).yUnits(yAxisUnits)
}
console.log(labelFieldType);
useDates = labelFieldType === "datetime"
}
const series = (valueColumns ?? []).map(column => ({
@ -110,6 +112,8 @@
data: data.map(row => {
if (!useDates) {
const value = get(row, column);
console.log("one");
console.log(value);
if (Array.isArray(value)) {
return null;
@ -121,6 +125,8 @@
return value;
} else {
console.log("two");
console.log([row[labelColumn], row[column]]);
return [row[labelColumn], row[column]]
}
}),