6

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 ?

Nagesh Salunke
  • 1,278
  • 3
  • 14
  • 37

2 Answers2

8

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.

thkala
  • 84,049
  • 23
  • 157
  • 201
1

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.

SheetJS
  • 22,470
  • 12
  • 65
  • 75
Anagio
  • 3,005
  • 9
  • 44
  • 81