score:9
Short Answer :
Either :
- Start your timing right before the chart code executes and setup a MutationObserver to watch the DOM and end the time when all mutation ends.
- Find out if the charting library has a done() event. (But be cautious as this can be inaccurate depending on implementation/library. "done()" could mean visually done, but background work is still being performed. This could cause interactivity to be jumpy until the chart is completely ready).
Long Answer :
I'm assuming your test data is quite large since most libraries can handle a couple thousand points without any negligible degradation. Measuring performance for client-side charting libraries is actually a two sided issue: rendering times and usability. Rendering times can be measured by the duration when a library interprets the dataset, to the visual representation of the chart. Depending on each library's interpretation algorithm, your mileage will vary depending on the data size. Let's say library X uses an aggressive sampling algorithm and only has to draw a small percentage of the dataset. Performance will be extremely fast, but it may or may not be an accurate representation of your data set. Even more so, interactivity at a finer grain detail could be limited.
Which leads me to the usability and interactivity aspect of performance. We're using a computer and not a chart on a piece of paper; it should be as interactive as possible. As the amount of interactivity goes up though, your browser could be susceptible to slowdown depending on the library's implementation. What if each of your million data points was to be an interactive dom node? 1 Million data points would surely crash the browser.
Most of the charting libraries out there deal with the tradeoff between performance, accuracy, and usability differently. As for what is It all depends on the implementation.
Plug/Source : I am a developer at ZingChart and we deal with our customers with large datasets all the time. We also built this which is pretty relevant to your tests : http://www.zingchart.com/demos/zingchart-vs/
score:1
My method is really basic. I create a var with current time then call a console.log() with the time I got to the end of my code block and the difference.
var start = +new Date();
//do lots of cool stuff
console.log('Rendered in ' + (new Date() - start) + ' ms');
Very generic and does what it says on the tin. If you want to measure each section of code you would have to make new time slots. Yes, the calculation takes time. But it is miniscule compared to what the code that I want to measure is doing. Example in action at the jsFiddle.
Source: stackoverflow.com
Related Query
- How to get Render Performance for Javascript based Charting Libraries?
- How can I get proper object through loop using javascript for Bubble Charts of Highcharts
- how to get each key and value from object in javascript for high chart graph
- php: laravel slow view render time when rendering javascript for highcharts
- How to get Series Name Based on Selection in Highcharts
- Get javascript highcharts to render inside a Bootstrap Popover
- Highcharts - how to get consistent mouseover and mouseout events for columns?
- HighCharts: How to get a specific color for value 0
- How to make Javascript output brackets for an Array of Arrays. (For Highcharts)
- How to get the correct the date-time format for highcharts in R (using rcharts)
- How to get region/province code from IP address
- How to get data for series and categories in highcharts-convert.js from mysql
- Javascript - How do I get the first element in an array?
- how to get dynamic color change based on values in highcharts
- How to convert php array into javascript array for Highchart JS
- How to get id for every data point in highchart
- How to transform Javascript Object based on one of the column?
- Error: Data source must be a URL for refresh | console error | javascript | Highcharts
- How to set different colors for bars based on value in Highchart bar chart?
- How to set pie chart wedge colors based on wedge values for highcharts?
- How do I get DateTime from mysql and set it to json format ready for highcharts
- javascript - Highcharts - Type Bar - How to set different starting for each bar
- How to get different colors for every column in a stacked column chart
- How to get Highchart plots plotted only for starting and ending points
- In Highcharts, how do I get consistent coordinates for points in IE,Chrome and Fixefox
- Javascript or other charting library for geodata
- how to create area highchart for large amount of data based date?
- Highcharts: when having multiple columns for the same X axis value, how can I get 1 tooltip per column?
- How to render Gantt Highchart from data source
- how to use javascript variable for complete series data
More Query from same tag
- R Highcharter Map Error - Parse Error Trailing Garbage
- Get javascript highcharts to render inside a Bootstrap Popover
- Highcharts bars are half missing after drillup
- What are the attributes that can be used in Highcharts' legend.labelFormat property?
- Highcharts IE10 support
- highcharts is not working in django
- Multiple pie-charts in the same chart with HighCharts
- Highchart graph display on iPad going out of container
- Highchart display of more than 1 series is not showing
- Zoom in Highmaps based on Lat/Long
- how can I move yAxis labels from Right of chart to left of chart in highstock
- Highchart axis max with multiple axes
- Override table cell background color in highcharts-tooltip
- Highcharts {Pie} - Remove slice pieces out onclick
- Too long chart axis label title
- how to improve the efficacy while dynamic create charts
- highcharts 3d scatter chart: displaying categories
- Step interval of "1" not working for me in Highcharts, why?
- Disable stretching time axis by additional tick (highcharts)
- Highchart column bar doesn't appear exactly
- Convert Base64 to normal PNG for copy/pasting
- Highcharts set x-axis categories
- Can you pass a variable to the data property in HighCharts?
- Highcharts - how to color spider chart areas by group value
- Get a reference to a Highcharts chart
- How can I hide series from a HighCharts legend?
- How to set vertical bar chart in Hightcharts | I passed as component. How to send as props
- Needing to convert JSON Object to JSON Array for Highcharts
- Move highcharts yAxis.tickPositioner callback function outside to some util function
- Formatting datetime in Highcharter tooltip