{"action":"closed","issue":{"url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/514","repository_url":"https://api.github.com/repos/nicolaskruchten/pivottable","labels_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/514/comments","events_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/514/events","html_url":"https://github.com/nicolaskruchten/pivottable/issues/514","id":164008429,"number":514,"title":"Preselected Filter results","user":{"login":"JIJOSEPH","id":1042916,"avatar_url":"https://avatars.githubusercontent.com/u/1042916?v=3","gravatar_id":"","url":"https://api.github.com/users/JIJOSEPH","html_url":"https://github.com/JIJOSEPH","followers_url":"https://api.github.com/users/JIJOSEPH/followers","following_url":"https://api.github.com/users/JIJOSEPH/following{/other_user}","gists_url":"https://api.github.com/users/JIJOSEPH/gists{/gist_id}","starred_url":"https://api.github.com/users/JIJOSEPH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JIJOSEPH/subscriptions","organizations_url":"https://api.github.com/users/JIJOSEPH/orgs","repos_url":"https://api.github.com/users/JIJOSEPH/repos","events_url":"https://api.github.com/users/JIJOSEPH/events{/privacy}","received_events_url":"https://api.github.com/users/JIJOSEPH/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-06T06:37:51Z","updated_at":"2016-07-22T13:28:58Z","closed_at":"2016-07-22T13:28:58Z","body":"Hi Nicolas,\r\n\r\nThanks for this great tool. I would like to filter a column (prepopulate it) with some selected options from a list  eg  When the pivot table first loads it lists all the weeks from the database. I would like it to select  4 weeks and a year by default. As shown in screenshot, the four weeks (field called assessment_wk_no)  value should be 25,24, 23, 22 and the year  (field called assessment_yr) value should be 2016.  I can't seem to get any info on inclusions (I believe that is the option I should use).\r\n\r\n        <script type=\"text/javascript\">\r\n    // This example has all the renderers loaded, \r\n    // and should work with touch devices.\r\n\r\n\r\n    $(function(){\r\n        var derivers = $.pivotUtilities.derivers;\r\n\r\n        var renderers = $.extend(\r\n            $.pivotUtilities.renderers, \r\n            $.pivotUtilities.c3_renderers, \r\n            $.pivotUtilities.d3_renderers, \r\n            $.pivotUtilities.export_renderers\r\n            );\r\n\r\n        $.getJSON(\"cronshaw.json\", function(mps) {\r\n            $(\"#output\").pivotUI(mps, {\r\n                renderers: renderers,\r\n                derivedAttributes: {\r\n                    \"Week No\": derivers.bin(\"assessment_wk_no\", 1),\r\n                },\r\n                cols:[\"bsd_agri_region_id\"], rows:  [\"Week No\",\"assessment_yr\"],\"vals\": [\"cronshaw_reading\"],\"aggregatorName\": \"Average\",\r\n                rendererName: \"Bar Chart\",\r\n                rendererOptions: {\r\n                    heatmap: {\r\n                        colorScaleGenerator: function(values) {\r\n                            return d3.scale.linear()\r\n                                .domain([d3.min(values), 2, d3.max(values)])\r\n                                .range([\"green\", \"yellow\", \"red\"])\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        });\r\n     });\r\n\r\n        </script>\r\n\r\nRegards\r\n\r\nJim\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1042916/16609456/5b7c06fc-4322-11e6-8d05-0a109ba39627.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1042916/16609429/35ce0b4e-4322-11e6-94f1-47b9c15ee9d7.png)\r\n"}}
{"actor":{"display_login":"nicolaskruchten"}}