Comments (3)
I don't currently have time do attempt this but another option would be to try https://github.com/Olical/react-faux-dom.
from react-chartist.
Hi @DylanPiercey Thanks for the suggestion here, Sorry I'm a little busy at work recently and don't have time to look at this.
I'll take some time to look into this probably this weekend.
from react-chartist.
@DylanPiercey Have you had a chance to demo SSR w/ react-chartist?
I just did a quick test with the example code from the repo and the response is:
<div><div class="ct-chart ct-octave"></div></div>
with this code:
var Pie = require('./Server/Chart');
var ComponentFactory = React.createFactory(Pie);
var html = ReactDOMServer.renderToStaticMarkup( ComponentFactory() );
This is because the first revolution of the DOM render
is still processing.. this is due to the logic being used in componentDidMount
, which waits for the DOM to mount before it applies the chart. In the server-side environment, react doesn't go past the first render cycle and immediately returns the first rendered output.
So, the answer to this is No. You cannot achieve server side render, with the current npm package.
from react-chartist.
Related Issues (20)
- React 18 compatibility concern
- Window resize causes data display problem HOT 2
- Time Series charts don't work, just put 'Invalid Date' for the label HOT 1
- Styling does not work when passing through either className or the style prop HOT 1
- how can I add event listener ?
- Are there any examples which show how to handle a click event?
- updateChart logic appears to be not allowing re-render
- adding value label top of the points HOT 2
- @types/chartist need to be runtime dependency HOT 7
- Zoom Feature
- Unable to launch the application: Unexpected token HOT 1
- Why types does not have the listener prop? HOT 1
- static getDerivedStateFromProps
- componentWillReceiveProps is not safe
- chart does not update on class change
- Chart doesn't shpw up HOT 5
- horizontal bars doesn't start at 0
- How to reduce thichness of plotted line in graph ? can't find proper syntax
- Chartist v1
- Chartist[type] is not a constructor HOT 2
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 react-chartist.