简体   繁体   中英

Charts,Server Side or Client Side?

Client Side Charts or Server Side Charts ?

(I had seen some questions based on this topic but none gives a conclusion.)

I am currently evaluating Client Side charts(javascript charts).
I have came across many articles saying client side charting as good.
The main reasong behind is it saves a server trip. Now switching to client side charts should require some reasons. Some stats.

  • My Web application involves high data operations.
  • Need client side interaction on charts to a lot extent.

What are exact differences between using client side and server side in terms of performance .
What are the advantages of one over the other ?

Your choice of technology should mostly depend on the CPU vs I/O ratio that is formed when you create your charts:

  • Charts generated from little data, such as pie-charts, are a good candidate for client side rendering; just send half a dozen data points and let the client render the chart, instead of rendering and sending a 30KB image on the server.

  • Charts generated from a large amount of data points should be rendered on the server; sending two million data points to the client for rendering is going to be both slow and expensive - bandwidth is not free.

In general you should optimize for less bandwidth usage, both to lower the operational cost and to make your service more responsive.

HighCharts is a very popular javascript charting library http://www.highcharts.com/ the charts are rendered in the browser client side but the data you'd be processing should be coming from your server. Their demo includes an AJAX loaded data chart http://www.highcharts.com/demo/line-ajax

Zendesk is using highcharts. The performance will come from a combination of how much data you are sending to the charts, how you process it and what your server environment is setup like.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM