datopian / datahub

🌀 Rapidly build rich data portals using a modern frontend framework
https://datahub.io/opensource
MIT License
2.16k stars 321 forks source link

[portaljs/components] Tidy API and docs of the components #1089

Closed olayway closed 1 week ago

olayway commented 1 month ago

Acceptance

interface DataProp {
    url?: "string";
    values?: Array<number | string>,
    csv?: "string"
}

Notes / Shaping

Tasks:

data argument: Multiple names - Situation + Problem + Solution

NB: mostly what we are doing is just wrapping an existing library so that it can be used in DataHub ...

e.g. already have ReactVega but we modify it a litle ...

In terms of design:

// data is preparsed in a nice form ... Table(data=...) Chart(data=...)

Usage

mydata = loadAndParseCsv(pathToCsv)
Table(data=mydata)
Chart(data=mydata)

But for markdown we don't have this option ... and we need to wrap ...

TableForUseInMarkdown(data={table: ...})
TableForUseInMarkdown(data={url: ...})
olayway commented 3 weeks ago

@demenech any progress here? :)

demenech commented 2 weeks ago

PR: https://github.com/datopian/datahub/pull/1103

CC: @olayway

olayway commented 1 week ago

FIXED