Skip to content

Commit

Permalink
UI updates
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelef committed Mar 12, 2024
1 parent e19c1e3 commit caaa15f
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 62 deletions.
79 changes: 79 additions & 0 deletions test-predict.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FusionChart - Temperature Readings</title>
<script
type="text/javascript"
src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"
></script>
<script
type="text/javascript"
src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"
></script>
<script
type="text/javascript"
src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.candy.js"
></script>
</head>
<body>
<h1>Temperature Readings of an Italian Town</h1>
<div id="chart-container"></div>

<script>
Promise.all([
loadData(
"https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/representing-predictive-data_data.json"
),
loadData(
"https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/representing-predictive-data_schema.json"
),
]).then(function (res) {
const data = res[0];
const schema = res[1];

const dataStore = new FusionCharts.DataStore();
const dataSource = {
caption: {
text: "Footfalls at Mega Store",
},
chart: {
theme: "candy",
},
subcaption: {
text: "Predictive footfall (represented in dashed)",
},
yaxis: [
{
plot: "Footfall",
title: "Footfall",
},
],
extensions: {
prediction: {
date: "08/01/18",
style: {
plot: "line",
},
},
},
};
dataSource.data = dataStore.createDataTable(data, schema);

new FusionCharts({
type: "timeseries",
renderAt: "chart-container",
width: "100%",
height: "500",
dataSource: dataSource,
}).render();
});

// Replace this with your actual loadData function
function loadData(url) {
return fetch(url).then((response) => response.json()); // Assuming JSON data
}
</script>
</body>
</html>
112 changes: 56 additions & 56 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "vite build",
"start": "vite --open",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"debug": "vite --port 4000"
},
"dependencies": {
"@emotion/react": "^11.11.4",
Expand All @@ -22,7 +23,7 @@
"@nivo/treemap": "^0.85.1",
"@uiw/react-github-corners": "^1.5.16",
"d3-regression": "^1.3.10",
"date-fns": "^3.3.1",
"date-fns": "^3.4.0",
"fusioncharts": "3.21.1",
"highcharts-react-official": "^3.2.1",
"papaparse": "^5.4.1",
Expand All @@ -36,15 +37,15 @@
"react18-json-view": "^0.2.7"
},
"devDependencies": {
"@types/react": "^18.2.64",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.21",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.4.2",
"vite": "^5.1.5"
"vite": "^5.1.6"
}
}

0 comments on commit caaa15f

Please sign in to comment.