Chart Fix - Import BC CSS and use Postcss

This commit is contained in:
cmack 2020-08-12 17:41:12 +01:00
parent db969e0f5c
commit 41a46847e5
7 changed files with 59 additions and 219 deletions

View File

@ -306,7 +306,7 @@ export default {
label: "destinationUrl", label: "destinationUrl",
key: "destinationUrl", key: "destinationUrl",
control: Input, control: Input,
placeholder: "/table/{{context._id}}", placeholder: "/table/_id",
}, },
], ],
}, },
@ -429,6 +429,38 @@ export default {
}, },
], ],
}, },
{
name: "Data Chart",
_component: "@budibase/standard-components/datachart",
description: "Shiny chart",
icon: "ri-bar-chart-line",
properties: {
design: { ...all },
settings: [
{ label: "Table", key: "model", control: ModelSelect },
{
label: "Chart Type",
key: "type",
control: OptionSelect,
options: [
"column2d",
"column3d",
"line",
"area2d",
"bar2d",
"bar3d",
"pie2d",
"pie3d",
"doughnut2d",
"doughnut3d",
"pareto2d",
"pareto3d",
],
},
],
},
children: [],
},
{ {
name: "Chart", name: "Chart",
description: "Shiny chart", description: "Shiny chart",
@ -440,6 +472,9 @@ export default {
description: "Donut chart", description: "Donut chart",
icon: "ri-donut-chart-line", icon: "ri-donut-chart-line",
properties: { properties: {
design: {
...all,
},
settings: [ settings: [
{ {
label: "Table", label: "Table",
@ -524,7 +559,6 @@ export default {
control: Input, control: Input,
}, },
], ],
}
}, },
}, },
{ {
@ -1245,15 +1279,6 @@ export default {
_component: "@budibase/standard-components/groupedbar", _component: "@budibase/standard-components/groupedbar",
description: "Groupedbar chart", description: "Groupedbar chart",
icon: "ri-bar-chart-fill", icon: "ri-bar-chart-fill",
presetProps: {
data: [
{
name: "2011-01",
group: "Direct",
value: 0,
},
],
},
properties: { properties: {
settings: [ settings: [
{ {
@ -1293,11 +1318,6 @@ export default {
key: "aspectRatio", key: "aspectRatio",
control: Input, control: Input,
}, },
{
label: "Height",
key: "height",
control: Input,
},
{ {
label: "Grid", label: "Grid",
key: "grid", key: "grid",
@ -1314,6 +1334,11 @@ export default {
key: "nameLabel", key: "nameLabel",
control: Input, control: Input,
}, },
{
label: "Value Label",
key: "valueLabel",
control: Input,
},
{ {
label: "Y Ticks", label: "Y Ticks",
key: "yTicks", key: "yTicks",

View File

@ -18,9 +18,16 @@
<link rel='stylesheet' href='/_builder/bbui.css'> <link rel='stylesheet' href='/_builder/bbui.css'>
<link rel='stylesheet' href='/_builder/fonts.css'> <link rel='stylesheet' href='/_builder/fonts.css'>
<link rel='stylesheet' href="/_builder/uikit.min.css"> <link rel='stylesheet' href="/_builder/uikit.min.css">
<!-- <link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/britecharts/dist/css/britecharts.min.css"
type="text/css"
/> -->
</head> </head>
<body id="app"> <body id="app">
<script src='/_builder/bundle.js'></script> <script src='/_builder/bundle.js'></script>
</body> </body>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,6 +24,7 @@
"rollup-plugin-json": "^4.0.0", "rollup-plugin-json": "^4.0.0",
"rollup-plugin-livereload": "^1.0.1", "rollup-plugin-livereload": "^1.0.1",
"rollup-plugin-node-resolve": "^5.0.0", "rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-postcss": "^3.1.5",
"rollup-plugin-svelte": "^5.0.0", "rollup-plugin-svelte": "^5.0.0",
"rollup-plugin-terser": "^5.1.1", "rollup-plugin-terser": "^5.1.1",
"shortid": "^2.2.15", "shortid": "^2.2.15",
@ -38,8 +39,8 @@
"gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691",
"dependencies": { "dependencies": {
"@beyonk/svelte-googlemaps": "^2.2.0", "@beyonk/svelte-googlemaps": "^2.2.0",
"britecharts": "^2.16.0", "britecharts": "^2.16.1",
"d3-selection": "^1.4.1", "d3-selection": "^1.4.2",
"fast-sort": "^2.2.0", "fast-sort": "^2.2.0",
"fusioncharts": "^3.15.1-sr.1", "fusioncharts": "^3.15.1-sr.1",
"svelte-fusioncharts": "^1.0.0" "svelte-fusioncharts": "^1.0.0"

View File

@ -1,6 +1,7 @@
import svelte from "rollup-plugin-svelte" import svelte from "rollup-plugin-svelte"
import resolve from "rollup-plugin-node-resolve" import resolve from "rollup-plugin-node-resolve"
import commonjs from "@rollup/plugin-commonjs" import commonjs from "@rollup/plugin-commonjs"
import postcss from "rollup-plugin-postcss"
export default { export default {
input: "src/index.js", input: "src/index.js",
@ -9,10 +10,13 @@ export default {
file: "dist/index.js", file: "dist/index.js",
format: "esm", format: "esm",
name: "budibaseStandardComponents", name: "budibaseStandardComponents",
sourcemap: "inline", sourcemap: true,
}, },
], ],
plugins: [ plugins: [
postcss({
plugins: [],
}),
svelte({ svelte({
hydratable: true, hydratable: true,
}), }),

View File

@ -1,3 +1,4 @@
import "britecharts/dist/css/britecharts.min.css"
export { default as donut } from "./Donut.svelte" export { default as donut } from "./Donut.svelte"
export { default as bar } from "./Bar.svelte" export { default as bar } from "./Bar.svelte"
export { default as line } from "./Line.svelte" export { default as line } from "./Line.svelte"