Comments (4)
try importing this in Graph.tsx
import { DataManipulator } from './DataManipulator';
from jpmc-tech-task-3-py3.
try importing this in Graph.tsx
import { DataManipulator } from './DataManipulator';
I am also having the same issue, and have attempted to import this but it has made no difference and I am still getting the same error as OP.
from jpmc-tech-task-3-py3.
Me too, Guys how did you solve it?
from jpmc-tech-task-3-py3.
Hi, i got it.
So, the problem was with "}", make sure to close it properly!!!
my Graph.tsx:
`import React, { Component } from 'react';
import { Table } from '@jpmorganchase/perspective';
import { ServerRespond } from './DataStreamer';
import { DataManipulator } from './DataManipulator';
import './Graph.css';
interface IProps {
data: ServerRespond[],
}
interface PerspectiveViewerElement extends HTMLElement {
load: (table: Table) => void,
}
class Graph extends Component<IProps, {}> {
table: Table | undefined;
render() {
return React.createElement('perspective-viewer');
}
componentDidMount() {
// Get element from the DOM.
const elem = document.getElementsByTagName('perspective-viewer')[0] as unknown as PerspectiveViewerElement;
const schema = {
price_abc: 'float',
price_def: 'float',
ratio: 'float',
timestamp: 'date',
upper_bound: 'float',
lower_bound: 'float',
trigger_alert: 'float',
};
if (window.perspective && window.perspective.worker()) {
this.table = window.perspective.worker().table(schema);
}
if (this.table) {
// Load the `table` in the `<perspective-viewer>` DOM reference.
elem.load(this.table);
elem.setAttribute('view', 'y_line');
elem.setAttribute('row-pivots', '["timestamp"]');
elem.setAttribute('columns', '["ratio", "lower_bound", "upper_bound", "trigger_alert"]');
elem.setAttribute('aggregates', JSON.stringify({
price_abc: 'avg',
price_def: 'avg',
ratio: 'avg',
timestamp: 'distinct count',
upper_bound: 'avg',
lower_bound: 'avg',
trigger_alert: 'avg',
}));
}
}
componentDidUpdate() {
if (this.table) {
this.table.update([
DataManipulator.generateRow(this.props.data),
]);
}
}
}
export default Graph;
`
from jpmc-tech-task-3-py3.
Related Issues (20)
- Wrong Graph, don't know which code error to fix
- REACT_DEVTOOLS_GLOBAL_HOOK is not defined
- Can't find Python executable "D:\Anaconda"
- Cannot find module 'C:\Windows\System32\JPMC-tech-task-3-PY3\node_modules\react-scripts\bin\react-scripts.js'
- cannot find python executable "python" HOT 1
- boundaries not correctly displayed HOT 1
- Npm start errors
- . HOT 1
- Argument of type 'Row[]' is not assignable to parameter of type 'TableData' HOT 4
- What is this error how can i solve it
- How to solve this error
- not able to create patch file in task 3
- server isnt starting
- NPM install not working
- Type 'Row' is not assignable to type 'Record<string, (string | number | boolean | Date)[]>'. Index signature for type 'string' is missing in type 'Row'.ts(2322) HOT 6
- Issue on npm install HOT 1
- Argument of type 'Row' is not assignable to parameter of type 'TableData'. Type 'Row' is not assignable to type 'string'. TS2345
- npm start not responding issue resolved
- Error after pressing "Start Streaming Data" button: NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:8080/query?id=1'. HOT 1
- Type error: Type 'Row[]' is not assignable to type 'string'. TS2322 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpmc-tech-task-3-py3.