projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f33ff7
)
don't draw graph for more than 5000 values
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 24 May 2010 19:36:41 +0000
(21:36 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 24 May 2010 19:36:41 +0000
(21:36 +0200)
public/facet_graph.js
patch
|
blob
|
history
diff --git
a/public/facet_graph.js
b/public/facet_graph.js
index
b9811d3
..
21b8dd9
100644
(file)
--- a/
public/facet_graph.js
+++ b/
public/facet_graph.js
@@
-1,3
+1,12
@@
+$(document).ready( function() {
+
+var count = parseInt( $('#facet-count').text() );
+if ( count > 5000 ) {
+ console.debug( 'skip graph', count );
+ return;
+}
+console.debug( 'drawing graph', count );
+
var data = {
x: {
min: Number.MAX_VALUE,
@@
-129,3
+138,4
@@
draw_labels( 'labels-y', data.y, data.height, 'bottom', 'bottom:'+data.height+'p
console.debug( 'data', data );
+}); // document.ready