Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Improve chart features #545

Open
grtjn opened this issue Dec 5, 2017 · 4 comments
Open

Improve chart features #545

grtjn opened this issue Dec 5, 2017 · 4 comments

Comments

@grtjn
Copy link
Contributor

grtjn commented Dec 5, 2017

Move code from landing control to charts service, and allow callback:

-    service.top10Chart = function(title, type, xFacet, xLabel, limit) {
+    service.top10Chart = function(title, type, xFacet, xLabel, limit, callback) {
       return {
         options: {
           chart: {
@@ -30,6 +30,21 @@
           },
           legend: {
             enabled: false
+          },
+          plotOptions: {
+            series: {
+              cursor: 'pointer',
+              point: {
+                events: {
+                  click: function (e) {
+                    var facet = this.series.name;
+                    var x = this.xCategory || this.x;
+                    var y = this.yCategory || this.y;
+                    callback(facet, x, y);
+                  }
+                }
+              }
+            }
@janmichaelyu
Copy link
Contributor

@grtjn Please assign to me. I think there are some improvements to be made as well as charts have multiple calls and are slow for big datasets.

@grtjn
Copy link
Contributor Author

grtjn commented Feb 19, 2018

There should be one call per chart. It could potentially reuse facets from search, but the landing page is not showing search results, and facets wouldn't support co-occurrence charts.

But please, do go ahead. Consider this ticket yours (cannot assign it)..

@janmichaelyu
Copy link
Contributor

Pull request that fixes the multiple calls:

https://github.com/ryanjdew/ml-highcharts-ng/pull/33

janmichaelyu added a commit to janmichaelyu/slush-marklogic-node that referenced this issue Apr 30, 2018
@janmichaelyu
Copy link
Contributor

Pull request that moves the chart functions to a separate service:
#552

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants