简体   繁体   English

服务器端与客户端图的生成

[英]Server-side versus Client-side Chart generation

I have to choose a tool to generate Graphs with information about time consumption, project time distribution and so.. I'm currently using PHP and I was wondering what are the pros and cons between client-side chart generation (such as Google Chart Tools ) and server-side (like PChart ). 我必须选择一种工具来生成带有时间消耗,项目时间分布等信息的图表。.我目前正在使用PHP,我想知道客户端图表生成之间的优缺点(例如Google Chart Tools) )和服务器端(如PChart )。 Any suggestion? 有什么建议吗?

The server gives you tighter control - relying on the client assumes that a) the user has JS enabled, and b) there isn't something wonky with their browser. 服务器为您提供了更严格的控制-依靠客户端假定a)用户已启用JS,并且b)浏览器没有问题。

However, doing it on the client means less resources spent on your server. 但是,在客户端上执行此操作将减少在服务器上花费的资源。 That might be important for you, or it might not. 那对您可能很重要,也可能不重要。

Well server side computational power is being used. 很好的服务器端计算能力正在被使用。 If you pay for CPU usage or have limited cpu usage phcarts could hurt. 如果您为CPU使用量付费或cpu使用量有限,phcarts可能会受伤。

Javascript charts are backend agnostic. Javascript图表与后端无关。 They are lightweight, put the burden of rendering on the user and are very lush colorful and interactive. 它们重量轻,给用户带来了渲染负担,并且色彩丰富,互动性非常好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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