├── .gitignore ├── LICENSE ├── README.md ├── SUPPORT.md ├── _config.yml ├── ddc-server ├── CONTRIBUTING.md ├── ContributorAgreement.txt ├── README.md ├── SUPPORT.md ├── ddc_server_architecture.pptx ├── deployment-assets │ ├── .gitkeep │ └── deploy-ddc-server.yaml ├── doc │ ├── .gitkeep │ ├── full-list.MD │ └── script-and-style-guidelines.MD └── img │ ├── .gitkeep │ ├── ddc-server-configured.png │ ├── ddc-server-screenshot.png │ ├── ddc_server_architecture.png │ └── home-page.jpg ├── samples ├── D3Thursday │ ├── 10_Sunburst.html │ ├── 11_Streamgraph.html │ ├── 12_Animated_Area.html │ ├── 13_SGF_2019_Streamgraph.html │ ├── 14_SGF_2019_Sunburst.html │ ├── 15_SGF_2019_Circle_Packing.html │ ├── 16_Basic_3D_Choropleth.html │ ├── 17_Interactive_3D_Choropleth.html │ ├── 18_Animated_3D_Choropleth.html │ ├── 19_3D_Residual_Plot.html │ ├── 2_Basic_Bar.html │ ├── 3_Dynamic_Bar.html │ ├── 4_Donut.html │ ├── 5_Styled_Donut.html │ ├── 6_Leaflet_Map.html │ ├── 7_Radar.html │ ├── 7_Radar_No_Scaling.html │ ├── 8_Variable_View_Stacked_Bar.html │ ├── 9_Split_Radar.html │ ├── 9_Split_Radar_No_Scaling.html │ ├── README.md │ ├── data │ │ ├── 7_Radar_Data_Prep.ctm │ │ ├── 7_Radar_Data_Prep.sas │ │ ├── 8_Sample_Data_Generator.sas │ │ ├── SAShelp_Baseball.sas7bdat │ │ ├── SAShelp_Cars.sas7bdat │ │ ├── Sample_Data_10.sas7bdat │ │ ├── Sample_Data_11.sas7bdat │ │ ├── Sample_Data_12.sas7bdat │ │ ├── Sample_Data_13.sas7bdat │ │ ├── Sample_Data_14.sas7bdat │ │ ├── Sample_Data_15.sas7bdat │ │ ├── Sample_Data_16.sas7bdat │ │ ├── Sample_Data_18.sas7bdat │ │ ├── Sample_Data_19.sas7bdat │ │ ├── Sample_Data_7.sas7bdat │ │ ├── Sample_Data_7_No_Scaling.sas7bdat │ │ ├── Sample_Data_8.sas7bdat │ │ ├── Sample_Data_9.sas7bdat │ │ └── Sample_Data_9_No_Scaling.sas7bdat │ └── images │ │ ├── 10.gif │ │ ├── 11.gif │ │ ├── 12.gif │ │ ├── 13.gif │ │ ├── 14.gif │ │ ├── 15.gif │ │ ├── 16.gif │ │ ├── 17.gif │ │ ├── 18.gif │ │ ├── 19.gif │ │ ├── 2.PNG │ │ ├── 3.gif │ │ ├── 4.gif │ │ ├── 5.gif │ │ ├── 6.gif │ │ ├── 7.gif │ │ ├── 8.gif │ │ └── 9.gif ├── DynamicWebPagesAndImages │ ├── AnimalImages │ │ ├── icon-bear.png │ │ ├── icon-cat.png │ │ ├── icon-chicken.png │ │ ├── icon-cow.png │ │ ├── icon-deer.png │ │ ├── icon-dog.png │ │ ├── icon-duck.png │ │ ├── icon-elephant.png │ │ ├── icon-frog.png │ │ ├── icon-giraffe.png │ │ ├── icon-goat.png │ │ ├── icon-horse.png │ │ ├── icon-koala.png │ │ ├── icon-lion.png │ │ ├── icon-monkey.png │ │ ├── icon-mouse.png │ │ ├── icon-panda.png │ │ ├── icon-pig.png │ │ └── icon-rhino.png │ ├── Animals.xlsx │ ├── Example of Parameterized URL and Dynamic Image.json │ ├── README.md │ ├── README_Images │ │ ├── ddc_DynamicImage.png │ │ ├── ddc_DynamicImageWithLink.png │ │ ├── ddc_DynamicImage_WithVAParameter.png │ │ ├── ddc_ParameterizedWikipediaURL.png │ │ └── ddc_ParameterizedWikipediaURL_WithVAParameter.png │ ├── ddc_DynamicImage.html │ ├── ddc_DynamicImageWithLink.html │ ├── ddc_DynamicImage_WithVAParameter.html │ ├── ddc_ParameterizedWikipediaURL.html │ └── ddc_ParameterizedWikipediaURL_WithVAParameter.html ├── IntegrationWithSASJobs │ ├── 1.HelloSmallWorld │ │ ├── HelloSmallWorld.html │ │ ├── HelloSmallWorld.sas │ │ ├── HelloSmallWorld.v4.html │ │ └── VA-DDC-Job Hello Small World.xml │ ├── 2.HelloBigWorlds │ │ ├── HelloBigWorld.html │ │ ├── HelloBigWorld.sas │ │ ├── HelloBigWorld.v4.html │ │ ├── HelloBigWorldFormatted.html │ │ ├── HelloBigWorldFormatted.sas │ │ ├── HelloBigWorldFormatted.v4.html │ │ └── VA-DDC-Job Hello Big Worlds.xml │ ├── 3.HelloCASWorld │ │ ├── HelloCASWorld.html │ │ ├── HelloCASWorld.sas │ │ ├── HelloCASWorld.v4.html │ │ └── VA-DDC-Job Hello CAS World.xml │ ├── 4.ParetoUseCase │ │ ├── Pareto.sas │ │ ├── ProxyDDCForVAJobCASIntegration.html │ │ ├── ProxyDDCForVAJobCASIntegration.v4.html │ │ ├── VA-DDC-Job Pareto use case.xml │ │ └── gdp_country_year_transposed.sas7bdat │ ├── 5.OutlierUseCase │ │ ├── Outlier.sas │ │ ├── VA-DDC-Job Outlier use case.xml │ │ └── outlier.sas7bdat │ └── README.md ├── MultiSelector │ ├── tail.select-adjustments-renato.js │ ├── tail.select-light-adjustments-renato.css │ ├── tail.select-light.min.css │ └── tail.select-light.min.map ├── README.md ├── TreeSelector │ └── tree.min.js ├── c3_BarChart.html ├── d3-funnel.js ├── d3_BarChart.html ├── d3_FunnelChart.html ├── d3_NetworkDiagram.html ├── d3_circlePacking.html ├── d3_radialStackedBar.html ├── d3_spiralHeatmap.html ├── d3_spiralPlot.html ├── dataUpdate.html ├── dataUpdate.v4.html ├── export2CSV.html ├── google_BarChart.html ├── google_Calendar.html ├── google_OrgChart.html ├── highcharts.html ├── images │ ├── c3_BarChart.png │ ├── d3_BarChart.png │ ├── d3_FunnelChart.png │ ├── d3_NetworkDiagram.png │ ├── d3_circlePacking.png │ ├── d3_radialStackedBar.png │ ├── d3_spiralHeatmap.png │ ├── d3_spiralPlot.png │ ├── dataUpdate.png │ ├── export2CSV.png │ ├── google_BarChart.png │ ├── google_Calendar.png │ ├── google_OrgChart.png │ ├── highcharts.gif │ ├── jsonDataViewer.png │ ├── multiSelector.jpg │ └── treeSelector.gif ├── jsonDataViewer.html ├── multiSelector.html └── treeSelector.html ├── thirdPartyHelpers ├── c3.js ├── d3.js └── google.js └── util ├── casUtil.js ├── casUtil.v4.js ├── contentUtil.js ├── jobUtil.js ├── jobUtil.v4.js └── messagingUtil.js /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | ## Support 2 | 3 | We use GitHub for tracking bugs and feature requests. Please submit a GitHub issue or pull request for support. -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /ddc-server/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a signed 9 | [Contributor Agreement](ContributorAgreement.txt). 10 | You (or your employer) retain the copyright to your contribution, 11 | this simply gives us permission to use and redistribute your contributions as 12 | part of the project. 13 | 14 | ## Code reviews 15 | 16 | All submissions, including submissions by project members, require review. We 17 | use GitHub pull requests for this purpose. Consult 18 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 19 | information on using pull requests. 20 | -------------------------------------------------------------------------------- /ddc-server/ContributorAgreement.txt: -------------------------------------------------------------------------------- 1 | Contributor Agreement 2 | 3 | Version 1.1 4 | 5 | Contributions to this software are accepted only when they are 6 | properly accompanied by a Contributor Agreement. The Contributor 7 | Agreement for this software is the Developer's Certificate of Origin 8 | 1.1 (DCO) as provided with and required for accepting contributions 9 | to the Linux kernel. 10 | 11 | In each contribution proposed to be included in this software, the 12 | developer must include a "sign-off" that denotes consent to the 13 | terms of the Developer's Certificate of Origin. The sign-off is 14 | a line of text in the description that accompanies the change, 15 | certifying that you have the right to provide the contribution 16 | to be included. For changes provided in source code control (for 17 | example, via a Git pull request) the sign-off must be included in 18 | the commit message in source code control. For changes provided 19 | in email or issue tracking, the sign-off must be included in the 20 | email or the issue, and the sign-off will be incorporated into the 21 | permanent commit message if the contribution is accepted into the 22 | official source code. 23 | 24 | If you can certify the below: 25 | 26 | Developer's Certificate of Origin 1.1 27 | 28 | By making a contribution to this project, I certify that: 29 | 30 | (a) The contribution was created in whole or in part by me and I 31 | have the right to submit it under the open source license 32 | indicated in the file; or 33 | 34 | (b) The contribution is based upon previous work that, to the best 35 | of my knowledge, is covered under an appropriate open source 36 | license and I have the right under that license to submit that 37 | work with modifications, whether created in whole or in part 38 | by me, under the same open source license (unless I am 39 | permitted to submit under a different license), as indicated 40 | in the file; or 41 | 42 | (c) The contribution was provided directly to me by some other 43 | person who certified (a), (b) or (c) and I have not modified 44 | it. 45 | 46 | (d) I understand and agree that this project and the contribution 47 | are public and that a record of the contribution (including all 48 | personal information I submit with it, including my sign-off) is 49 | maintained indefinitely and may be redistributed consistent with 50 | this project or the open source license(s) involved. 51 | 52 | then you just add a line saying 53 | 54 | Signed-off-by: Random J Developer 55 | 56 | using your real name (sorry, no pseudonyms or anonymous contributions.) 57 | 58 | 59 | Signed-off-by: Sundaresh Sankaran || -------------------------------------------------------------------------------- /ddc-server/README.md: -------------------------------------------------------------------------------- 1 | # The Data-driven Content Server (DDC Server) 2 | 3 | **Access third-party visualizations within [SAS Visual Analytics](https://www.sas.com/en_us/software/visual-analytics.html) using the [Data-driven Content (DDC) server](#)!** 4 | 5 | Visual Analytics report creators find some tasks around current DDC usage intimidating or cumbersome. We want to **make it easier for users to quickly access and use third-party & customized reporting templates**. 6 | 7 | This folder within the repository helps both report creators and administrators. It provides administrators configuration to install a DDC server on a Kubernetes cluster, and instructs report creators how to use the same within Visual Analytics. 8 | 9 | ## Contents 10 | 1. [Installation](#installation-for-administrators) 11 | 2. [Usage](#usage-for-report-creators) 12 | 3. [Why do we need a DDC Server?](#why-do-we-need-a-ddc-server) 13 | 4. [Architecture](#architecture) 14 | 5. [Contact](#contact-in-case-of-questions) 15 | 16 | **Has somebody already installed this for you? Skip straight to the [Usage](#usage) section. Else, refer the installation steps below.** 17 | 18 | ## Installation (for administrators) 19 | 1. The DDC server is a single configuration file (.yaml) containing a Kubernetes Deployment and a Service definition. Apply this file on the same cluster as SAS Viya 4, within a different namespace if preferred. 20 | 21 | ``` 22 | kubectl apply -f deploy-ddc-server.yaml 23 | ``` 24 | 25 | Refer [here](#architecture) for an architecture diagram which can guide your installation. 26 | 27 | 2. Follow [validation steps](#validation-steps). Once the file is applied, a Kubernetes pod hosts the DDC web application, backed by the deployment. The deployment can be used to scale in response to demand. This pod is exposed to users through a Service, as a load balancer. 28 | 29 | 3. Provide a common URL for external IP / hostname of the load balancer. This can be done through making a DNS entry to add a C-name (alias) pointing to the external IP. A suggested pattern is ddc.your_viya_fqdn.com , where your_viya_fqdn.com points to the SAS Viya application. [Here](https://gitlab.sas.com/GEL/workshops/PSGEL297-sas-viya-4-deployment-on-amazon-elastic-kubernetes-service/-/blob/main/Track-B-Automated/03_520_Deploy_SAS_Viya.md#establish-a-wildcard-dns-alias-for-the-ingress-to-sas-viya) is a guide for similar steps with the NAMES utility (internal to SAS), which you may follow. 30 | 31 | ## Usage (for report creators) 32 | Use the DDC server endpoints in exactly the same way you use other [data-driven content](https://go.documentation.sas.com/doc/en/vacdc/v_014/vaobj/n1tlhkaafz8e77n1xxc6de9iuv59.htm) in SAS Visual Analytics. Only, this is much easier. 33 | 34 | ### Samples 35 | Select Full List from the top-right menu of the application home page. This provides you a list of chart examples, all taken from the SAS Github repository for third party visualizations (located [here](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/tree/master/samples/)). Simply select the chart example you would like to use, and click on the link for the same. Or, you can just copy the endpoint (for example, https://ddc.your_viya_fqdn.com/c3-bar-chart) and enter it in the URL section of the Data-driven Content object in VA. 36 | 37 | The complete list of endpoints is [listed here.](./doc/full-list.MD) 38 | 39 | Note: The DDC server has packaged all sample customizations part of the [SAS Software GitHub repository for Third Party Visualizations](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/tree/master/samples). We are open to extending this to include many more examples. Drop us ([Sundaresh](mailto:sundaresh.sankaran@sas.com) or [Renato](mailto:renato.luppi@sas.com)) an email with your enquiries. 40 | 41 | ### Upload your own 42 | If you wish to use your own custom visualization, click on "Upload your own" from the top right menu. Browse and select the HTML page (ensure your HTML page contains, or has access to necessary script and style utility files) you would like to use. 43 | 44 | You will receive a new endpoint starting with **/userddc/**. Simply append this to the end of your current DDC server address and use as the URL within VA. 45 | 46 | **Note:** In case you'ld like to use additional Javascript or CSS static files, refer [here](./doc/script-and-style-guidelines.MD) for guidelines on how to incorporate them into your HTML. A simple option is to include Javascript and CSS inline within your HTML. 47 | 48 | 49 | ## ADDITIONAL DETAILS 50 | 51 | ## Why do we need a DDC Server? 52 | 53 | Our self-service reporting and visualization (Visual Analytics) users love to consume insights using both SAS reporting components and open libraries - [C3.js](https://c3js.org), [D3.js](https://d3js.org), [Google Charts](https://developers.google.com/chart), to name a few. 54 | 55 | Since 2018, SAS Visual Analytics has been providing the [Data-driven Content object](https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/1800-2018.pdf) to visualize SAS data using third-party or custom-built web pages. However, tasks necessary for DDC to operate, such are serving templates on an external web server, inhibit more users from using this tool. 56 | 57 | We alleviate this through the Data-driven Content server. The DDC server is a web application containing visualization templates which can be made available as URLs to VA. Once the DDC server is deployed (which could be alongside the Viya deployment, or even standalone), users simply provide a URL to their desired chart template within the Options tab, and are all set to visualize their data! 58 | 59 | Here's a general idea : 60 | 61 | ![General Idea](./img/ddc-server-screenshot.png) 62 | 63 | 64 | ## Validation steps 65 | 66 | After applying the file : 67 | 68 | ``` 69 | kubectl apply -f deploy-ddc-server.yaml 70 | ``` 71 | , you get 72 | 73 | ![DDC Server and deployment configured](./img/ddc-server-configured.png) 74 | 75 | After making the DNS entry, the root (ddc.your_viya_fqdn.com/) end-point of the application should show up on a screen as follows: 76 | 77 | ![Home Page](./img/home-page.jpg) 78 | 79 | Since this example uses a self-signed certificate, the first time you visit the URL leads to a warning as shown below. Feel free to ignore this, as this is a feature of browsers against self-signed certificates. You may choose to use a signed certificate, or get your browser to trust the certificate, as a workaround. 80 | 81 | ## Architecture 82 | 83 | Here's the architecture for the DDC Server. 84 | 85 | ![DDC Server Architecture](./img/ddc_server_architecture.png) 86 | 87 | 88 | ## Want to make your own DDC server?? 89 | Coming soon - steps and assets to build your own DDC server. At its heart, the DDC server is a simple web application which hosts different chart reporting templates. This web application has been packaged into an image which is then made available in a central registry like Docker. Customers and different teams can choose to build their customized DDC Server (or servers) following the same model. Watch this space for more. 90 | 91 | ## Contact, in case of questions 92 | * [Sundaresh Sankaran](mailto:sundaresh.sankaran@sas.com) 93 | * [Renato Luppi](mailto:renato.luppi@sas.com) 94 | -------------------------------------------------------------------------------- /ddc-server/SUPPORT.md: -------------------------------------------------------------------------------- 1 | ## Support 2 | 3 | In future, we will use GitHub for tracking bugs and feature requests. Please submit a GitHub issue or pull request for support. 4 | 5 | For now, please direct your enquiries to [Sundaresh Sankaran](mailto:sundaresh.sankaran@sas.com). 6 | -------------------------------------------------------------------------------- /ddc-server/ddc_server_architecture.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/ddc_server_architecture.pptx -------------------------------------------------------------------------------- /ddc-server/deployment-assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/deployment-assets/.gitkeep -------------------------------------------------------------------------------- /ddc-server/deployment-assets/deploy-ddc-server.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: ss-ddc-server 5 | namespace: webapp 6 | spec: 7 | selector: 8 | matchLabels: 9 | app: ss-ddc-server 10 | replicas: 1 11 | template: 12 | metadata: 13 | labels: 14 | app: ss-ddc-server 15 | spec: 16 | containers: 17 | - name: ss-ddc-server 18 | image: sundareshsas/sas-ddc-server:latest 19 | imagePullPolicy: Always 20 | ports: 21 | - name: https 22 | containerPort: 8080 23 | protocol: TCP 24 | --- 25 | apiVersion: v1 26 | kind: Service 27 | metadata: 28 | name: ss-ddc-service 29 | namespace: webapp 30 | spec: 31 | type: LoadBalancer 32 | ports: 33 | - port: 8080 34 | targetPort: 8080 35 | protocol: TCP 36 | selector: 37 | app: ss-ddc-server 38 | 39 | -------------------------------------------------------------------------------- /ddc-server/doc/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/doc/.gitkeep -------------------------------------------------------------------------------- /ddc-server/doc/full-list.MD: -------------------------------------------------------------------------------- 1 | # Full list of chart template endpoints available in the DDC Server 2 | 3 | Here's a list of all endpoints available in the DDC server. Note that at any point, the server may contain additional templates where testing is underway. We welcome further contributions to the [Samples page](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/tree/master/samples) in GitHub, and can consider new templates for inclusion. Or, you could just [email us.](mailto:sundaresh.sankaran@sas.com) 4 | 5 | |Sl No|Object|Path| 6 | |----|----|----| 7 | |1.|C3 Bar Chart|/c3-bar-chart| 8 | |2.|D3 Bar Chart|/d3-bar-chart| 9 | |3.|D3 Circle Packing|/d3-circle-packing| 10 | |4.|D3 Network Diagram|/d3-network-diagram| 11 | |5.|D3 Funnel|/d3-funnel| 12 | |6.|D3 Radial Chart|/d3-radial| 13 | |7.|D3 Spiral Heatmap|/d3-spiral-heatmap| 14 | |8.|D3 Spiral Plot|/d3-spiral-plot| 15 | |9.|Export to CSV|/export-to-csv| 16 | |10.|Google Bar Chart|/google-bar-chart| 17 | |11.|Google Calendar|/google-calendar| 18 | |12.|Google Organization Chart|/google-org-chart| 19 | |13.|JSON Data Viewer|/json-data-viewer| 20 | |14.|Multi Selector|/multi-selector| 21 | |15.|Any User-uploaded Content|/userddc/name-of-file| 22 | 23 | Note that the names of user uploaded files may undergo slight transformations using the [secure_filename](https://tedboy.github.io/flask/generated/werkzeug.secure_filename.html) package. 24 | 25 | 26 | -------------------------------------------------------------------------------- /ddc-server/doc/script-and-style-guidelines.MD: -------------------------------------------------------------------------------- 1 | # Guidelines for script and style files 2 | 3 | Note that in the [SAS Software GitHub repository for third party customizations](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations), contributors mention utility files which facilitate, among other things, the interchange of information between VA and the DDC through data object transformations. 4 | 5 | These same [utility files](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/tree/master/util) and [helper files](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/tree/master/thirdPartyHelpers) are already available on the DDC server and can be accessed using the following pattern. An example is provided below. 6 | 7 | ``` 8 | 9 | 10 | 11 | 12 | ``` 13 | 14 | Therefore, if you have a new template you would like to export, and want to make use of these utility files, insert a script tag into your HTML accordingly. 15 | 16 | **Future functionality!** We are looking at ways to provide functionalities which will enable users to upload their own custom helper and utility files, and will update the image once this task is complete. 17 | 18 | -------------------------------------------------------------------------------- /ddc-server/img/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/img/.gitkeep -------------------------------------------------------------------------------- /ddc-server/img/ddc-server-configured.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/img/ddc-server-configured.png -------------------------------------------------------------------------------- /ddc-server/img/ddc-server-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/img/ddc-server-screenshot.png -------------------------------------------------------------------------------- /ddc-server/img/ddc_server_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/img/ddc_server_architecture.png -------------------------------------------------------------------------------- /ddc-server/img/home-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/ddc-server/img/home-page.jpg -------------------------------------------------------------------------------- /samples/D3Thursday/2_Basic_Bar.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 41 | 42 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /samples/D3Thursday/data/7_Radar_Data_Prep.ctm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32 | 33 | 34 | 35 | New Task 36 | This is a blank task 37 | 726B2B12-4542-4200-96F4-960C645D767F 38 | TBD 39 | 4.3 40 | 41 | SAS Studio Documentation 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | Character variable: 52 | Numeric variable: 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 153 | 154 | -------------------------------------------------------------------------------- /samples/D3Thursday/data/7_Radar_Data_Prep.sas: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | * Copyright 2018 SAS Institute Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Author: Ryan West 17 | * 18 | * Input: Any dataset with at least one categorical variable and 1 numerical variable 19 | * 20 | * Output: The input dataset modified into a tall version with columns category, metric, 21 | * measure, and format. 22 | * 23 | * Parameters: One categorical variable followed by N numerical variables 24 | * 25 | * Dependencies/Assumptions: D3 Radar Chart assumes all numerical variables take positive values. 26 | * 27 | * Usage: Modify the macro variables below as desired and run. 28 | * 29 | \******************************************************************************/ 30 | 31 | /* Modify these lines to specify your desired dataset and variables */ 32 | %let DATASOURCE=SASHELP.CARS; 33 | %let CHAR_VAR=Type; 34 | %let NUM_VARS=Cylinders, EngineSize, MSRP; 35 | 36 | %macro radar_data_prep / parmbuff; 37 | /* Extract data set name */ 38 | %let lib_dot_ds=%scan(&syspbuff, 1, '(,'); 39 | %let ds=%scan(&lib_dot_ds, 2); 40 | 41 | /* Extract categorical variable */ 42 | %let cat_var=%scan(&syspbuff, 3); 43 | 44 | /* Extract first numerical variable */ 45 | %let num=1; 46 | %let num_var=%scan(&syspbuff, &num+3); 47 | 48 | /* Iterate as long as numerical variable is defined */ 49 | %do %while(&num_var ne); 50 | /* Generate means by category */ 51 | proc means data=&lib_dot_ds noprint; 52 | class &cat_var; 53 | var &num_var; 54 | output out=means_&num (drop=_:) mean=; 55 | run; 56 | 57 | /* Remove entry for non-categorized, add metric, and replace num_var with measure */ 58 | data means_# 59 | set means_# 60 | drop &num_var; 61 | length Metric $20; 62 | if (&cat_var ^= ""); 63 | Metric=vlabel(&num_var); 64 | Measure=&num_var; 65 | Format=vformat(&num_var); 66 | run; 67 | 68 | /* Append means data sets together */ 69 | %if (&num = 1) %then %do; 70 | data D3_Radar_&ds; 71 | set means_1; 72 | run; 73 | %end; 74 | %else %do; 75 | data D3_Radar_&ds; 76 | set D3_Radar_&ds means_# 77 | run; 78 | %end; 79 | 80 | /* Remove temporary data sets */ 81 | proc datasets noprint; 82 | delete means_# 83 | run; 84 | 85 | /* Iterate to next numerical variable */ 86 | %let num=%eval(&num+1); 87 | %let num_var=%scan(&syspbuff, &num+3); 88 | %end; 89 | 90 | /* Print first ten observatons to confirm success */ 91 | proc print data=D3_Radar_&ds (obs=10); 92 | run; 93 | %mend radar_data_prep; 94 | 95 | %radar_data_prep(&DATASOURCE, &CHAR_VAR, &NUM_VARS); -------------------------------------------------------------------------------- /samples/D3Thursday/data/8_Sample_Data_Generator.sas: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | * Copyright 2018 SAS Institute Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Author: Ryan West 17 | * 18 | * Output: A randomized dataset with columns Year (string), Country (string), 19 | * Population (number), and View (string) for use with D3 variable view stacked 20 | * bar chart, titled "8_Sample_Data" in the Work library. 21 | * 22 | * Usage: Run to produce dataset. 23 | * 24 | \******************************************************************************/ 25 | 26 | 27 | data work.Sample_Data_8; 28 | label Population = "Population (in millions)"; /* Designate labels how we want them to display in VA */ 29 | drop Year_n; /* Drop numeric version of variable*/ 30 | input Country $32.; /* Read in country from datalines */ 31 | 32 | /* Iterate over all years in range */ 33 | do Year_n = 1960 to 2010; 34 | /* Assign alignment depending on parity */ 35 | if mod(_N_, 2) eq 0 then View = "Center Aligned"; 36 | else View = "Left Aligned"; 37 | 38 | /* Randomly generate population for each year */ 39 | Population = rand("Integer", 30, 300); 40 | 41 | /* Put numeric year into character variable */ 42 | Year = put(Year_n, $4.); 43 | output; 44 | end; 45 | 46 | datalines; 47 | Andorra 48 | Belgium 49 | Mexico 50 | Syria 51 | United Arab Emirates 52 | United Kingdom 53 | United States 54 | Zimbabwe 55 | ; 56 | run; 57 | -------------------------------------------------------------------------------- /samples/D3Thursday/data/SAShelp_Baseball.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/SAShelp_Baseball.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/SAShelp_Cars.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/SAShelp_Cars.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_10.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_10.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_11.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_11.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_12.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_12.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_13.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_13.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_14.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_14.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_15.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_15.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_16.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_16.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_18.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_18.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_19.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_19.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_7.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_7.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_7_No_Scaling.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_7_No_Scaling.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_8.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_8.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_9.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_9.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/data/Sample_Data_9_No_Scaling.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/data/Sample_Data_9_No_Scaling.sas7bdat -------------------------------------------------------------------------------- /samples/D3Thursday/images/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/10.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/11.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/12.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/13.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/14.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/15.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/16.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/17.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/18.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/19.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/2.PNG -------------------------------------------------------------------------------- /samples/D3Thursday/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/3.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/4.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/5.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/6.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/7.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/8.gif -------------------------------------------------------------------------------- /samples/D3Thursday/images/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/D3Thursday/images/9.gif -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-bear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-bear.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-cat.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-chicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-chicken.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-cow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-cow.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-deer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-deer.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-dog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-dog.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-duck.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-elephant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-elephant.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-frog.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-giraffe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-giraffe.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-goat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-goat.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-horse.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-koala.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-lion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-lion.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-monkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-monkey.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-mouse.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-panda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-panda.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-pig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-pig.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/AnimalImages/icon-rhino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/AnimalImages/icon-rhino.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/Animals.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/Animals.xlsx -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/README.md: -------------------------------------------------------------------------------- 1 | # Dynamic Web Pages and Images 2 | 3 | These examples were developed as a part of the blog series on SAS Communities. To get started, checkout the [first post in the blog series](https://communities.sas.com/t5/SAS-Communities-Library/Embedding-Dynamic-Web-Pages-and-Images-in-SAS-Visual-Analytics/ta-p/763378). For a quick access to the series go [here](https://communities.sas.com/t5/tag/dynamic%20web%20pages%20and%20images/tg-p/board-id/library). 4 | 5 | Here you will find the following: 6 | 1. Source table in Excel format to be imported in SAS Visual Analytics (Animals.xlsx). 7 | 2. DDC implementation files (*.html) to be deployed in your Web server. You will need to edit those files to adjust the URLs that point to JavaScript utility libraries, according to your environment. 8 | 3. SAS Visual Analytics report in JSON format (Example of Parameterized URL and Dynamic Image.json). This report was created with SAS Visual Analytics 8.5 and therefore it can be imported into version 8.5 and above by a SAS administrator or any user with Import rights. Once the report is imported, you will need to make changes to the DDC objects URLs under the Options pane in SAS Visual Analytics, to match your environment. 9 | 4. Animal image icons. Well, they are actually placeholders - feel free to replace them with your own icons/images. 10 | 11 | 12 | ### Dynamic Web Page | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/DynamicWebPagesAndImages/ddc_ParameterizedWikipediaURL.html) | [Blog Post](https://communities.sas.com/t5/SAS-Communities-Library/Embedding-Dynamic-Web-Pages-and-Images-in-SAS-Visual-Analytics/ta-p/763378) 13 | 14 | 15 | 16 | This example shows how to dynamically load a Web page based on information received from report objects and passed to DDC in the `data` portion of the JSON message. 17 | 18 | ### Dynamic Web Page Using VA Parameter | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/DynamicWebPagesAndImages/ddc_ParameterizedWikipediaURL_WithVAParameter.html) | [Blog Post](https://communities.sas.com/t5/SAS-Communities-Library/Embedding-Dynamic-Web-Pages-and-Images-in-SAS-Visual-Analytics/ta-p/763378) 19 | 20 | 21 | 22 | This example shows how to dynamically load a Web page based on information received from report objects and passed to DDC in the `parameters` portion of the JSON message. 23 | 24 | ### Dynamic Image | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/DynamicWebPagesAndImages/ddc_DynamicImage.html) | [Blog Post](https://communities.sas.com/t5/SAS-Communities-Library/Embedding-Dynamic-Web-Pages-and-Images-in-SAS-Visual-Analytics/ta-p/763738) 25 | 26 | 27 | 28 | This example shows how to dynamically load an image based on information received from report objects and passed to DDC in the `data` portion of the JSON message. 29 | 30 | ### Dynamic Image Using VA Parameter | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/DynamicWebPagesAndImages/ddc_DynamicImage_WithVAParameter.html) | [Blog Post](https://communities.sas.com/t5/SAS-Communities-Library/Embedding-Dynamic-Web-Pages-and-Images-in-SAS-Visual-Analytics/ta-p/763738) 31 | 32 | 33 | 34 | This example shows how to dynamically load an image based on information received from report objects and passed to DDC in the `parameters` portion of the JSON message. 35 | 36 | ### Dynamic Image With Link to Web Page | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/DynamicWebPagesAndImages/ddc_DynamicImageWithLink.html) | [Blog Post](https://communities.sas.com/t5/SAS-Communities-Library/Embedding-Dynamic-Web-Pages-and-Images-in-SAS-Visual-Analytics/ta-p/763749) 37 | 38 | 39 | 40 | This example combines the previous and shows how to dynamically load an image based on information received from report objects and then dynamically load a Web page when the image is clicked. 41 | -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/README_Images/ddc_DynamicImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/README_Images/ddc_DynamicImage.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/README_Images/ddc_DynamicImageWithLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/README_Images/ddc_DynamicImageWithLink.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/README_Images/ddc_DynamicImage_WithVAParameter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/README_Images/ddc_DynamicImage_WithVAParameter.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/README_Images/ddc_ParameterizedWikipediaURL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/README_Images/ddc_ParameterizedWikipediaURL.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/README_Images/ddc_ParameterizedWikipediaURL_WithVAParameter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/DynamicWebPagesAndImages/README_Images/ddc_ParameterizedWikipediaURL_WithVAParameter.png -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/ddc_DynamicImage.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 38 | 39 | 40 | 41 |
42 | 43 |
44 | 45 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/ddc_DynamicImageWithLink.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 49 | 50 | 51 | 52 |
53 | 54 | 55 |
56 | 57 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/ddc_DynamicImage_WithVAParameter.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 19 | 39 | 40 | 41 | 42 |
43 | 44 |
45 | 46 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/ddc_ParameterizedWikipediaURL.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 38 | 39 | 40 | 41 |
42 | 43 |
44 | 45 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /samples/DynamicWebPagesAndImages/ddc_ParameterizedWikipediaURL_WithVAParameter.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 19 | 39 | 40 | 41 | 42 |
43 | 44 |
45 | 46 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/1.HelloSmallWorld/HelloSmallWorld.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Create ODS HTML output from VA Data 20 | 21 | 22 | 35 | 36 | 92 | 93 | 94 |
95 | 96 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/1.HelloSmallWorld/HelloSmallWorld.sas: -------------------------------------------------------------------------------- 1 | * The JSON file this job expects contains the JSON message ; 2 | * that SAS Visual Analytics sent to the Data-Driven Content object.; 3 | * It contains not only data, but also column metadata. ; 4 | 5 | * Application input parameter: ; 6 | * vaJSON - the stringified JSON message that VA sent to the DDC ; 7 | 8 | *==================================================================; 9 | * Initialization; 10 | *==================================================================; 11 | 12 | * Copy the JSON data from input parameter to a temp file; 13 | filename vaJSON temp; 14 | 15 | data _null_; 16 | file vaJSON; 17 | length str $32767; 18 | str = resolve(symget('vaJSON')); 19 | put str; 20 | run; 21 | 22 | * Use the JSON engine to provide read-only sequential access to JSON data; 23 | libname jsonLib json fileref=vaJSON; 24 | 25 | *==================================================================; 26 | * Main Processing; 27 | *==================================================================; 28 | 29 | * Generate and send back ODS output table; 30 | proc print data=jsonLib.data; 31 | run; 32 | 33 | *==================================================================; 34 | * Finalization; 35 | *==================================================================; 36 | 37 | * No finalization steps required in this simple example; 38 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/1.HelloSmallWorld/HelloSmallWorld.v4.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | Create ODS HTML output from VA Data 21 | <-script type="text/javascript" src="http://your.host.name/github/util/messagingUtil.js"> 22 | 23 | 39 | 40 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/2.HelloBigWorlds/HelloBigWorld.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Create ODS HTML output from VA Data 20 | 21 | 22 | 35 | 36 | 99 | 100 | 101 |
102 | 103 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/2.HelloBigWorlds/HelloBigWorld.sas: -------------------------------------------------------------------------------- 1 | * The JSON file this job expects contains the JSON message ; 2 | * that SAS Visual Analytics sent to the Data-Driven Content object.; 3 | * It contains not only data, but also column metadata. ; 4 | 5 | *==================================================================; 6 | * Initialization; 7 | *==================================================================; 8 | 9 | * Retrieve JSON data from uploaded file; 10 | filename vaJSON filesrvc "&_WEBIN_FILEURI"; 11 | 12 | * Use the JSON engine to provide read-only sequential access to JSON data; 13 | libname jsonLib json fileref=vaJSON; 14 | 15 | *==================================================================; 16 | * Main Processing; 17 | *==================================================================; 18 | 19 | * Generate and send back ODS output table; 20 | proc print data=jsonLib.data label noobs; 21 | run; 22 | 23 | *==================================================================; 24 | * Finalization; 25 | *==================================================================; 26 | 27 | * No finalization required in this simple example; 28 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/2.HelloBigWorlds/HelloBigWorld.v4.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | Create ODS HTML output from VA Data 21 | 22 | 23 | 39 | 40 | 119 | 120 | 121 | 122 |
123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/2.HelloBigWorlds/HelloBigWorldFormatted.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Create ODS HTML output from VA Data 20 | 21 | 22 | 23 | 36 | 37 | 101 | 102 | 103 |
104 | 105 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/2.HelloBigWorlds/HelloBigWorldFormatted.sas: -------------------------------------------------------------------------------- 1 | * The JSON file this job expects contains the modified JSON message; 2 | * that SAS Visual Analytics sent to the Data-Driven Content object.; 3 | * It contains transformed data and additional column metadata. ; 4 | 5 | *==================================================================; 6 | * Initialization; 7 | *==================================================================; 8 | 9 | * This allows for unconventional column names (e.g.: spaces, etc.); 10 | options VALIDVARNAME=any; 11 | 12 | * Retrieve JSON data from uploaded file; 13 | filename vaJSON filesrvc "&_WEBIN_FILEURI"; 14 | 15 | * Use the JSON engine to provide read-only sequential access to JSON data; 16 | libname jsonLib json fileref=vaJSON; 17 | 18 | * Create table to assist creation of JSON map file; 19 | * Replace blank spaces in column names with underscore (_); 20 | * Output table contains column name, label, type, format, format width, and format precision; 21 | %macro prepColMetadata; 22 | %if %sysfunc(exist(jsonLib.columns_format)) %then %do; 23 | proc sql noprint; 24 | create table col_metadata as ( 25 | select 26 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 27 | c.label, 28 | c.type4job as type, 29 | f.name4job as fmt_name, 30 | f.width4job as fmt_width, 31 | f.precision4job as fmt_precision 32 | from jsonLib.columns c left join jsonLib.columns_format f 33 | on c.ordinal_columns = f.ordinal_columns 34 | ); 35 | quit; 36 | %end; 37 | %else %do; 38 | * table columns_format does not exsist; 39 | * all columns are strings (no format object in the JSON structure); 40 | proc sql noprint; 41 | create table col_metadata as ( 42 | select 43 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 44 | c.label, 45 | c.type4job as type, 46 | "" as fmt_name, 47 | . as fmt_width, 48 | . as fmt_precision 49 | from jsonLib.columns c 50 | ); 51 | quit; 52 | %end; 53 | %mend; 54 | 55 | %prepColMetadata; 56 | 57 | filename jmap temp lrecl=32767; 58 | 59 | * Create JSON map file to be used to read VA JSON with proper labels, formats, types, etc.; 60 | data _null_; 61 | file jmap; 62 | set col_metadata end=eof; 63 | if _n_=1 then do; 64 | put '{"DATASETS":[{"DSNAME": "data_formatted","TABLEPATH": "/root/data","VARIABLES": ['; 65 | end; 66 | else do; 67 | put ','; 68 | end; 69 | if fmt_name ne "" then 70 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 71 | '","NAME":"',column, 72 | '","LABEL":"',label, 73 | '","TYPE":"',type, 74 | '","FORMAT":["',fmt_name,'",',fmt_width,',',fmt_precision,']}'); 75 | else 76 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 77 | '","NAME":"',column, 78 | '","LABEL":"',label, 79 | '","TYPE":"',type,'"}'); 80 | put line; 81 | if eof then do; 82 | put ']}]}'; 83 | end; 84 | run; 85 | 86 | * Reassign JSON libname engine to provide read-only sequential access to JSON data, now with map; 87 | libname jsonLib json fileref=vaJSON map=jmap; 88 | 89 | *==================================================================; 90 | * Main Processing; 91 | *==================================================================; 92 | 93 | * Generate and send back ODS output table; 94 | proc print data=jsonLib.data_formatted label noobs; 95 | run; 96 | 97 | *==================================================================; 98 | * Finalization; 99 | *==================================================================; 100 | 101 | * No finalization required in this simple example; 102 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/2.HelloBigWorlds/HelloBigWorldFormatted.v4.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | Create ODS HTML output from VA Data 21 | 22 | 23 | 24 | 40 | 41 | 119 | 120 | 121 | 122 |
123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/3.HelloCASWorld/HelloCASWorld.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Create CAS table from VA Data 20 | 21 | 22 | 23 | 24 | 34 | 35 | 137 | 138 | 139 |
140 | 141 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/3.HelloCASWorld/HelloCASWorld.sas: -------------------------------------------------------------------------------- 1 | * The JSON file this job expects contains the modified JSON message; 2 | * that SAS Visual Analytics sent to the Data-Driven Content object.; 3 | * It contains transformed data and additional column metadata. ; 4 | 5 | *==================================================================; 6 | * Initialization; 7 | *==================================================================; 8 | 9 | * This allows for unconventional column names (e.g.: spaces, etc.); 10 | options VALIDVARNAME=any; 11 | 12 | * This allows for the stopOnError macro function to run the sas commands after an error occurs; 13 | options NOSYNTAXCHECK; 14 | 15 | %macro stopOnError(msg); 16 | %put &=SYSRC &=SYSCC &=SYSFILRC &=SYSLIBRC &=SYSERR SYSERRORTEXT=%superq(syserrortext) &=MSG; 17 | %if (&msg eq ) %then %let msg=%superq(syserrortext); 18 | %if (&syserr > 6 or &msg ne ) %then %do; 19 | proc json out=_webout nosastags nopretty nokeys; 20 | write open object; 21 | write values "success" false; 22 | write values "retcode" &SYSERR; 23 | write values "message" "&MSG"; 24 | write close; 25 | run; 26 | cas mySession terminate; 27 | %let SYSCC=0; 28 | %abort cancel; 29 | %end; 30 | %mend stopOnError; 31 | 32 | %macro checkParams; 33 | %if (not %symexist(castab)) %then %stopOnError(Missing parameter CASTAB); 34 | %mend checkParams; 35 | %checkParams; 36 | 37 | * Connect to CAS and assign the CASUSER library; 38 | options cashost="your.host.name" casport=5570; 39 | cas mySession; 40 | %stopOnError(); 41 | 42 | libname casuser CAS caslib="casuser"; 43 | %stopOnError(); 44 | 45 | * Retrieve JSON data from uploaded file; 46 | filename vaJSON filesrvc "&_WEBIN_FILEURI"; 47 | %stopOnError(); 48 | 49 | * Use the JSON engine to provide read-only sequential access to JSON data; 50 | libname jsonLib json fileref=vaJSON; 51 | %stopOnError(); 52 | 53 | * Create table to assist creation of JSON map file; 54 | * Replace blank spaces in column names with underscore (_); 55 | * Output table contains column name, label, type, format, format width, and format precision; 56 | %macro prepColMetadata; 57 | %if %sysfunc(exist(jsonLib.columns_format)) %then %do; 58 | proc sql noprint; 59 | create table col_metadata as ( 60 | select 61 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 62 | c.label, 63 | c.type4job as type, 64 | f.name4job as fmt_name, 65 | f.width4job as fmt_width, 66 | f.precision4job as fmt_precision 67 | from jsonLib.columns c left join jsonLib.columns_format f 68 | on c.ordinal_columns = f.ordinal_columns 69 | ); 70 | quit; 71 | %stopOnError(); 72 | %end; 73 | %else %do; 74 | * table columns_format does not exsist; 75 | * all columns are strings (no format object in the JSON structure); 76 | proc sql noprint; 77 | create table col_metadata as ( 78 | select 79 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 80 | c.label, 81 | c.type4job as type, 82 | "" as fmt_name, 83 | . as fmt_width, 84 | . as fmt_precision 85 | from jsonLib.columns c 86 | ); 87 | quit; 88 | %stopOnError(); 89 | %end; 90 | %mend; 91 | 92 | %prepColMetadata; 93 | 94 | filename jmap temp lrecl=32767; 95 | %stopOnError(); 96 | 97 | * Create JSON map file to be used to read VA JSON with proper labels, formats, types, etc.; 98 | data _null_; 99 | file jmap; 100 | set col_metadata end=eof; 101 | if _n_=1 then do; 102 | put '{"DATASETS":[{"DSNAME": "data_formatted","TABLEPATH": "/root/data","VARIABLES": ['; 103 | end; 104 | else do; 105 | put ','; 106 | end; 107 | if fmt_name ne "" then 108 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 109 | '","NAME":"',column, 110 | '","LABEL":"',label, 111 | '","TYPE":"',type, 112 | '","FORMAT":["',fmt_name,'",',fmt_width,',',fmt_precision,']}'); 113 | else 114 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 115 | '","NAME":"',column, 116 | '","LABEL":"',label, 117 | '","TYPE":"',type,'"}'); 118 | put line; 119 | if eof then do; 120 | put ']}]}'; 121 | end; 122 | run; 123 | %stopOnError(); 124 | 125 | * Reassign JSON libname engine to provide read-only sequential access to JSON data, now with map; 126 | libname jsonLib json fileref=vaJSON map=jmap; 127 | %stopOnError(); 128 | 129 | *==================================================================; 130 | * Main Processing; 131 | *==================================================================; 132 | 133 | * Add table to CAS lib casuser (session scope); 134 | data casuser.&CASTAB._TMP; 135 | set jsonLib.data_formatted; 136 | run; 137 | %stopOnError(); 138 | 139 | * Put table on its final destination: casuser and global scope; 140 | proc casutil; 141 | droptable casdata="&CASTAB" incaslib="casuser" QUIET; 142 | promote casdata="&CASTAB._TMP" incaslib="casuser" 143 | casout="&CASTAB" outcaslib="casuser" DROP; 144 | run; 145 | quit; 146 | %stopOnError(); 147 | 148 | *==================================================================; 149 | * Finalization; 150 | *==================================================================; 151 | 152 | cas mySession terminate; 153 | 154 | * The return code to is sent back to the calling client (Data-Driven Content object) in JSON format; 155 | proc json out=_webout nosastags nopretty nokeys; 156 | write open object; 157 | write values "success" true; 158 | write values "retcode" 0; 159 | write values "message" "success"; 160 | write close; 161 | run; 162 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/3.HelloCASWorld/HelloCASWorld.v4.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | Create CAS table from VA Data 21 | 22 | 23 | 24 | 25 | 36 | 37 | 151 | 152 | 153 | 154 |
155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/4.ParetoUseCase/Pareto.sas: -------------------------------------------------------------------------------- 1 | * The JSON file this job expects contains the modified JSON message; 2 | * that SAS Visual Analytics sent to the Data-Driven Content object.; 3 | * It contains transformed data and additional column metadata. ; 4 | 5 | *==================================================================; 6 | * Initialization; 7 | *==================================================================; 8 | 9 | * This allows for unconventional column names (e.g.: spaces, etc.); 10 | options VALIDVARNAME=any; 11 | 12 | * This allows for the stopOnError macro function to run the sas commands after an error occurs; 13 | options NOSYNTAXCHECK; 14 | 15 | %macro stopOnError(msg); 16 | %put &=SYSRC &=SYSCC &=SYSFILRC &=SYSLIBRC &=SYSERR SYSERRORTEXT=%superq(syserrortext) &=MSG; 17 | %if (&msg eq ) %then %let msg=%superq(syserrortext); 18 | %if (&syserr > 6 or &msg ne ) %then %do; 19 | proc json out=_webout nosastags nopretty nokeys; 20 | write open object; 21 | write values "success" false; 22 | write values "retcode" &SYSERR; 23 | write values "message" "&MSG"; 24 | write close; 25 | run; 26 | cas mySession terminate; 27 | %let SYSCC=0; 28 | %abort cancel; 29 | %end; 30 | %mend stopOnError; 31 | 32 | %macro checkParams; 33 | %if (not %symexist(castab)) %then %stopOnError(Missing parameter CASTAB); 34 | %mend checkParams; 35 | %checkParams; 36 | 37 | * Connect to CAS and assign the CASUSER library; 38 | options cashost="your.host.name" casport=5570; 39 | cas mySession; 40 | %stopOnError(); 41 | 42 | libname casuser CAS caslib="casuser"; 43 | %stopOnError(); 44 | 45 | * Retrieve JSON data from uploaded file; 46 | filename vaJSON filesrvc "&_WEBIN_FILEURI"; 47 | %stopOnError(); 48 | 49 | * Use the JSON engine to provide read-only sequential access to JSON data; 50 | libname jsonLib json fileref=vaJSON; 51 | %stopOnError(); 52 | 53 | * Create table to assist creation of JSON map file; 54 | * Replace blank spaces in column names with underscore (_); 55 | * Output table contains column name, label, type, format, format width, and format precision; 56 | %macro prepColMetadata; 57 | %if %sysfunc(exist(jsonLib.columns_format)) %then %do; 58 | proc sql noprint; 59 | create table col_metadata as ( 60 | select 61 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 62 | c.label, 63 | c.type4job as type, 64 | f.name4job as fmt_name, 65 | f.width4job as fmt_width, 66 | f.precision4job as fmt_precision 67 | from jsonLib.columns c left join jsonLib.columns_format f 68 | on c.ordinal_columns = f.ordinal_columns 69 | ); 70 | quit; 71 | %stopOnError(); 72 | %end; 73 | %else %do; 74 | * table columns_format does not exsist; 75 | * all columns are strings (no format object in the JSON structure); 76 | proc sql noprint; 77 | create table col_metadata as ( 78 | select 79 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 80 | c.label, 81 | c.type4job as type, 82 | "" as fmt_name, 83 | . as fmt_width, 84 | . as fmt_precision 85 | from jsonLib.columns c 86 | ); 87 | quit; 88 | %stopOnError(); 89 | %end; 90 | %mend; 91 | 92 | %prepColMetadata; 93 | 94 | filename jmap temp lrecl=32767; 95 | %stopOnError(); 96 | 97 | * Create JSON map file to be used to read VA JSON with proper labels, formats, types, etc.; 98 | data _null_; 99 | file jmap; 100 | set col_metadata end=eof; 101 | if _n_=1 then do; 102 | put '{"DATASETS":[{"DSNAME": "data_formatted","TABLEPATH": "/root/data","VARIABLES": ['; 103 | end; 104 | else do; 105 | put ','; 106 | end; 107 | if fmt_name ne "" then 108 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 109 | '","NAME":"',column, 110 | '","LABEL":"',label, 111 | '","TYPE":"',type, 112 | '","FORMAT":["',fmt_name,'",',fmt_width,',',fmt_precision,']}'); 113 | else 114 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 115 | '","NAME":"',column, 116 | '","LABEL":"',label, 117 | '","TYPE":"',type,'"}'); 118 | put line; 119 | if eof then do; 120 | put ']}]}'; 121 | end; 122 | run; 123 | %stopOnError(); 124 | 125 | * Reassign JSON libname engine to provide read-only sequential access to JSON data, now with map; 126 | libname jsonLib json fileref=vaJSON map=jmap; 127 | %stopOnError(); 128 | 129 | *==================================================================; 130 | * Main Processing; 131 | *==================================================================; 132 | 133 | * Add table to CAS lib casuser (session scope); 134 | data casuser.&CASTAB._TMP; 135 | set jsonLib.data_formatted; 136 | run; 137 | %stopOnError(); 138 | 139 | proc contents data=casuser.&CASTAB._TMP out=casuser.columns noprint; 140 | run; 141 | %stopOnError(); 142 | 143 | proc sql noprint; 144 | select name, varnum into :colname1 - :colname2, :dummy 145 | from casuser.columns 146 | order by varnum; 147 | quit; 148 | %stopOnError(); 149 | 150 | PROC FREQ DATA=casuser.&CASTAB._TMP ORDER=FREQ noprint; 151 | TABLES "&colname1"n / OUTCUM OUT=casuser.&CASTAB._TMP SCORES=TABLE; 152 | WEIGHT "&colname2"n; 153 | RUN; 154 | %stopOnError(); 155 | 156 | data casuser.&CASTAB._TMP; 157 | set casuser.&CASTAB._TMP; 158 | percent = percent/ 100; 159 | cum_pct = cum_pct/ 100; 160 | run; 161 | %stopOnError(); 162 | 163 | * Put table on its final destination: casuser and global scope; 164 | proc casutil; 165 | droptable casdata="&CASTAB" incaslib="casuser" QUIET; 166 | promote casdata="&CASTAB._TMP" incaslib="casuser" 167 | casout="&CASTAB" outcaslib="casuser" DROP; 168 | run; 169 | quit; 170 | %stopOnError(); 171 | 172 | *==================================================================; 173 | * Finalization; 174 | *==================================================================; 175 | 176 | cas mySession terminate; 177 | 178 | * The return code to is sent back to the calling client (Data-Driven Content object) in JSON format; 179 | proc json out=_webout nosastags nopretty nokeys; 180 | write open object; 181 | write values "success" true; 182 | write values "retcode" 0; 183 | write values "message" "success"; 184 | write close; 185 | run; 186 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/4.ParetoUseCase/ProxyDDCForVAJobCASIntegration.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Create CAS table from VA Data 20 | 21 | 22 | 23 | 24 | 34 | 35 | 137 | 138 | 139 |
140 | 141 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/4.ParetoUseCase/ProxyDDCForVAJobCASIntegration.v4.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | Create CAS table from VA Data 21 | 22 | 23 | 24 | 25 | 36 | 37 | 151 | 152 | 153 | 154 |
155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/4.ParetoUseCase/VA-DDC-Job Pareto use case.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/IntegrationWithSASJobs/4.ParetoUseCase/VA-DDC-Job Pareto use case.xml -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/4.ParetoUseCase/gdp_country_year_transposed.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/IntegrationWithSASJobs/4.ParetoUseCase/gdp_country_year_transposed.sas7bdat -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/5.OutlierUseCase/Outlier.sas: -------------------------------------------------------------------------------- 1 | * The JSON file this job expects contains the modified JSON message; 2 | * that SAS Visual Analytics sent to the Data-Driven Content object.; 3 | * It contains transformed data and additional column metadata. ; 4 | 5 | *==================================================================; 6 | * Initialization; 7 | *==================================================================; 8 | 9 | * This allows for unconventional column names (e.g.: spaces, etc.); 10 | options VALIDVARNAME=any; 11 | 12 | * This allows for the stopOnError macro function to run the sas commands after an error occurs; 13 | options NOSYNTAXCHECK; 14 | 15 | %macro stopOnError(msg); 16 | %put &=SYSRC &=SYSCC &=SYSFILRC &=SYSLIBRC &=SYSERR SYSERRORTEXT=%superq(syserrortext) &=MSG; 17 | %if (&msg eq ) %then %let msg=%superq(syserrortext); 18 | %if (&syserr > 6 or &msg ne ) %then %do; 19 | proc json out=_webout nosastags nopretty nokeys; 20 | write open object; 21 | write values "success" false; 22 | write values "retcode" &SYSERR; 23 | write values "message" "&MSG"; 24 | write close; 25 | run; 26 | cas mySession terminate; 27 | %let SYSCC=0; 28 | %abort cancel; 29 | %end; 30 | %mend stopOnError; 31 | 32 | %macro checkParams; 33 | %if (not %symexist(castab)) %then %stopOnError(Missing parameter CASTAB); 34 | %mend checkParams; 35 | %checkParams; 36 | 37 | * Connect to CAS and assign the CASUSER library; 38 | options cashost="your.host.name" casport=5570; 39 | cas mySession; 40 | %stopOnError(); 41 | 42 | libname casuser CAS caslib="casuser"; 43 | %stopOnError(); 44 | 45 | * Retrieve JSON data from uploaded file; 46 | filename vaJSON filesrvc "&_WEBIN_FILEURI"; 47 | %stopOnError(); 48 | 49 | * Use the JSON engine to provide read-only sequential access to JSON data; 50 | libname jsonLib json fileref=vaJSON; 51 | %stopOnError(); 52 | 53 | * Create table to assist creation of JSON map file; 54 | * Replace blank spaces in column names with underscore (_); 55 | * Output table contains column name, label, type, format, format width, and format precision; 56 | %macro prepColMetadata; 57 | %if %sysfunc(exist(jsonLib.columns_format)) %then %do; 58 | proc sql noprint; 59 | create table col_metadata as ( 60 | select 61 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 62 | c.label, 63 | c.type4job as type, 64 | f.name4job as fmt_name, 65 | f.width4job as fmt_width, 66 | f.precision4job as fmt_precision 67 | from jsonLib.columns c left join jsonLib.columns_format f 68 | on c.ordinal_columns = f.ordinal_columns 69 | ); 70 | quit; 71 | %stopOnError(); 72 | %end; 73 | %else %do; 74 | * table columns_format does not exsist; 75 | * all columns are strings (no format object in the JSON structure); 76 | proc sql noprint; 77 | create table col_metadata as ( 78 | select 79 | c.ordinal_columns, translate(trim(c.label),'_',' ') as column, 80 | c.label, 81 | c.type4job as type, 82 | "" as fmt_name, 83 | . as fmt_width, 84 | . as fmt_precision 85 | from jsonLib.columns c 86 | ); 87 | quit; 88 | %stopOnError(); 89 | %end; 90 | %mend; 91 | 92 | %prepColMetadata; 93 | 94 | filename jmap temp lrecl=32767; 95 | %stopOnError(); 96 | 97 | * Create JSON map file to be used to read VA JSON with proper labels, formats, types, etc.; 98 | data _null_; 99 | file jmap; 100 | set col_metadata end=eof; 101 | if _n_=1 then do; 102 | put '{"DATASETS":[{"DSNAME": "data_formatted","TABLEPATH": "/root/data","VARIABLES": ['; 103 | end; 104 | else do; 105 | put ','; 106 | end; 107 | if fmt_name ne "" then 108 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 109 | '","NAME":"',column, 110 | '","LABEL":"',label, 111 | '","TYPE":"',type, 112 | '","FORMAT":["',fmt_name,'",',fmt_width,',',fmt_precision,']}'); 113 | else 114 | line=cats('{"PATH":"/root/data/element',ordinal_columns, 115 | '","NAME":"',column, 116 | '","LABEL":"',label, 117 | '","TYPE":"',type,'"}'); 118 | put line; 119 | if eof then do; 120 | put ']}]}'; 121 | end; 122 | run; 123 | %stopOnError(); 124 | 125 | * Reassign JSON libname engine to provide read-only sequential access to JSON data, now with map; 126 | libname jsonLib json fileref=vaJSON map=jmap; 127 | %stopOnError(); 128 | 129 | *==================================================================; 130 | * Main Processing; 131 | *==================================================================; 132 | 133 | * Add table to CAS lib casuser (session scope); 134 | data casuser.&CASTAB._TMP; 135 | set jsonLib.data_formatted; 136 | run; 137 | %stopOnError(); 138 | 139 | * Remove outliers in the last data point of the series; 140 | data casuser.&CASTAB._TMP (drop = prev_KPI); 141 | set casuser.&CASTAB._TMP; 142 | by Product Month; 143 | 144 | retain prev_KPI; 145 | 146 | if not first.Product and last.Product then do; 147 | if abs(KPI - prev_KPI) > 0.1 then do; 148 | *KPI = prev_KPI; * repeats the previous data point; 149 | KPI = .; * ignores the data point; 150 | end; 151 | end; 152 | prev_KPI = KPI; 153 | run; 154 | %stopOnError(); 155 | 156 | * Put table on its final destination: casuser and global scope; 157 | proc casutil; 158 | droptable casdata="&CASTAB" incaslib="casuser" QUIET; 159 | promote casdata="&CASTAB._TMP" incaslib="casuser" 160 | casout="&CASTAB" outcaslib="casuser" DROP; 161 | run; 162 | quit; 163 | %stopOnError(); 164 | 165 | *==================================================================; 166 | * Finalization; 167 | *==================================================================; 168 | 169 | cas mySession terminate; 170 | 171 | * The return code to is sent back to the calling client (Data-Driven Content object) in JSON format; 172 | proc json out=_webout nosastags nopretty nokeys; 173 | write open object; 174 | write values "success" true; 175 | write values "retcode" 0; 176 | write values "message" "success"; 177 | write close; 178 | run; 179 | -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/5.OutlierUseCase/outlier.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/IntegrationWithSASJobs/5.OutlierUseCase/outlier.sas7bdat -------------------------------------------------------------------------------- /samples/IntegrationWithSASJobs/README.md: -------------------------------------------------------------------------------- 1 | # Examples of Integration with SAS Jobs 2 | 3 | These examples were developed as a part of the blog series on SAS Communities. To get started, checkout the [first post in the blog series](https://communities.sas.com/t5/SAS-Communities-Library/Introduction-to-Integration-of-SAS-Visual-Analytics-with-SAS/ta-p/670823). For a quick access to the series go [here](https://communities.sas.com/t5/tag/VA-DDC-Jobs%20Integration/tg-p/board-id/library). 4 | 5 | Recently we eliminated the dependency on jQuery from all utility files, and consequently we provided alternatives to implement these examples without jQuery as well. Those alternate examples have a **.v4** in their names. 6 | -------------------------------------------------------------------------------- /samples/MultiSelector/tail.select-light-adjustments-renato.css: -------------------------------------------------------------------------------- 1 | .search-input, 2 | .tail-select .select-label .label-inner, 3 | .tail-select .select-label .label-count, 4 | .tail-select input[type=text], 5 | .tail-select .select-dropdown ul li, 6 | .tail-select .select-dropdown .dropdown-empty { 7 | //font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 8 | //font-size: 14px; 9 | font-family: "Trebuchet MS"; 10 | font-size: 10pt; 11 | //margin: 0; 12 | } 13 | .tail-select .select-dropdown { 14 | margin: 1px 0 0 0; 15 | } 16 | 17 | .tail-select.active .select-label, .tail-select.idle .select-label, .tail-select:hover .select-label { 18 | -webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,.1), 0 0 1px 1px rgba(0,0,0,.25); 19 | } 20 | 21 | .tail-select input[type=text] { 22 | padding: 10px 100px 10px 15px; 23 | } 24 | 25 | /* State & Icons :: Multiple (same as Single) */ 26 | .tail-select.multiple .select-dropdown ul li.dropdown-option:before{ 27 | background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212%22%20height%3D%2216%22%20viewBox%3D%220%200%2012%2016%22%3E%3Cpath%20fill%3D%22%23303438%22%20d%3D%22M12%205l-8%208-4-4%201.5-1.5L4%2010l6.5-6.5L12%205z%22/%3E%3C/svg%3E"); 28 | } 29 | .tail-select.multiple .select-dropdown ul li.dropdown-option:hover:before, 30 | .tail-select.multiple .select-dropdown ul li.dropdown-option.hover:before{ 31 | opacity: 0.5; 32 | } 33 | .tail-select.multiple .select-dropdown ul li.dropdown-option.selected{ 34 | color: #3C82E6; 35 | background-color: white; 36 | } 37 | .tail-select.multiple .select-dropdown ul li.dropdown-option.selected:before{ 38 | opacity: 0.85; 39 | background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212%22%20height%3D%2216%22%20viewBox%3D%220%200%2012%2016%22%3E%3Cpath%20fill%3D%22%23303438%22%20d%3D%22M12%205l-8%208-4-4%201.5-1.5L4%2010l6.5-6.5L12%205z%22/%3E%3C/svg%3E"); 40 | } 41 | .tail-select.multiple .select-dropdown ul li.dropdown-option.selected .option-description{ 42 | color: #3C82E6; 43 | } 44 | .tail-select.multiple.deselect .select-dropdown ul li.dropdown-option.selected:hover:before, 45 | .tail-select.multiple.deselect .select-dropdown ul li.dropdown-option.selected.hover:before{ 46 | opacity: 0.85; 47 | background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212%22%20height%3D%2216%22%20viewBox%3D%220%200%2012%2016%22%3E%3Cpath%20fill%3D%22%23303438%22%20d%3D%22M7.48%208l3.75%203.75-1.48%201.48L6%209.48l-3.75%203.75-1.48-1.48L4.52%208%20.77%204.25l1.48-1.48L6%206.52l3.75-3.75%201.48%201.48L7.48%208z%22/%3E%3C/svg%3E"); 48 | } 49 | .tail-select.multiple.deselect .select-dropdown ul li.dropdown-option.selected:hover .option-description, 50 | .tail-select.multiple.deselect .select-dropdown ul li.dropdown-option.selected.hover .option-description{ 51 | color: #3C82E6; 52 | } 53 | .tail-select.multiple .select-dropdown ul li.dropdown-option{ 54 | transition: all 0.3s ease-in; 55 | } 56 | .tail-select.multiple .select-dropdown ul li.dropdown-option:hover, 57 | .tail-select.multiple .select-dropdown ul li.dropdown-option.hover{ 58 | transition: all 0.4s ease; 59 | background-color: #e9edf2; 60 | } 61 | .tail-select.multiple.disabled .select-dropdown ul li.dropdown-option, 62 | .tail-select.multiple .select-dropdown ul li.dropdown-option.disabled{ 63 | cursor: not-allowed; 64 | color: rgba(48, 52, 56, 0.4); 65 | text-shadow: 0px 1px 0px rgba(119, 129, 138, 0.1), 0px -1px 0px rgba(0, 0, 0, 0.1); 66 | background-color: #fafafa; 67 | } 68 | .tail-select.multiple.disabled .select-dropdown ul li.dropdown-option:before, 69 | .tail-select.multiple .select-dropdown ul li.dropdown-option.disabled:before{ 70 | opacity: 0.85; 71 | background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2216%22%20viewBox%3D%220%200%2014%2016%22%3E%3Cpath%20fill%3D%22%23303438%22%20d%3D%22M7%201C3.14%201%200%204.14%200%208s3.14%207%207%207%207-3.14%207-7-3.14-7-7-7zm0%201.3c1.3%200%202.5.44%203.47%201.17l-8%208A5.755%205.755%200%200%201%201.3%208c0-3.14%202.56-5.7%205.7-5.7zm0%2011.41c-1.3%200-2.5-.44-3.47-1.17l8-8c.73.97%201.17%202.17%201.17%203.47%200%203.14-2.56%205.7-5.7%205.7z%22/%3E%3C/svg%3E"); 72 | } 73 | .tail-select.multiple.disabled .select-dropdown ul li.dropdown-option .option-description, 74 | .tail-select.multiple .select-dropdown ul li.dropdown-option.disabled .option-description{ 75 | color: rgba(48, 52, 56, 0.4); 76 | } 77 | 78 | /* width */ 79 | ::-webkit-scrollbar { 80 | width: 12px; 81 | } 82 | 83 | /* Track */ 84 | ::-webkit-scrollbar-track { 85 | box-shadow: inset 0 0 5px grey; 86 | border-radius: 4px; 87 | } 88 | 89 | /* Handle */ 90 | ::-webkit-scrollbar-thumb { 91 | background: grey; 92 | border-radius: 4px; 93 | } 94 | 95 | /* Handle on hover */ 96 | ::-webkit-scrollbar-thumb:hover { 97 | background: #555555; 98 | } 99 | 100 | /* Buttons * 101 | ::-webkit-scrollbar-button:single-button { 102 | background-color: #bbbbbb; 103 | display: block; 104 | border-style: solid; 105 | height: 13px; 106 | width: 16px; 107 | border-radius: 4px; 108 | } 109 | /* Up * 110 | ::-webkit-scrollbar-button:single-button:vertical:decrement { 111 | border-width: 0 8px 8px 8px; 112 | border-color: transparent transparent #777777 transparent; 113 | } 114 | 115 | ::-webkit-scrollbar-button:single-button:vertical:decrement:hover { 116 | border-color: transparent transparent #555555 transparent; 117 | } 118 | /* Down * 119 | ::-webkit-scrollbar-button:single-button:vertical:increment { 120 | border-width: 8px 8px 0 8px; 121 | border-color: #777777 transparent transparent transparent; 122 | } 123 | 124 | ::-webkit-scrollbar-button:vertical:single-button:increment:hover { 125 | border-color: #555555 transparent transparent transparent; 126 | } 127 | */ 128 | -------------------------------------------------------------------------------- /samples/MultiSelector/tail.select-light.min.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["$stdin"],"names":[],"mappings":"AACA,aACA,eAEA,oBADA,qBAEE,WAAY,WACZ,gBAAiB,WACjB,mBAAoB,WAEtB,aACA,eACE,QAAS,EACT,YAAa,KACb,eAAgB,KAChB,gBAAiB,KACjB,iBAAkB,KAClB,oBAAqB,KAEvB,aACE,MAAO,MACP,OAAQ,IACR,QAAS,EACT,QAAS,aACT,SAAU,SACV,UAAW,KACX,YAAa,KACb,YAAa,QAEf,kBACE,MAAO,KACP,iBAAkB,QAEpB,oBACE,QAAS,EAEX,6BACA,8BACE,OAAQ,KACR,OAAQ,EAAE,IACV,QAAS,IAAI,IACb,QAAS,aACT,UAAW,KACX,YAAa,KACb,YAAa,KACb,eAAgB,EAChB,eAAgB,KAChB,eAAgB,IAChB,aAAc,IACd,aAAc,MACd,aAAc,YACd,cAAe,IACf,WAAY,KACZ,mBAAoB,KACpB,WAAY,MAAM,MAAM,MAAM,CAAE,OAAO,MAAM,MAAM,CAAE,WAAW,MAAM,OACtE,mBAAoB,MAAM,MAAM,MAAM,CAAE,OAAO,MAAM,MAAM,CAAE,WAAW,MAAM,OAEhF,6BACE,MAAO,kBACP,aAAc,kBACd,iBAAkB,YAEpB,mCACE,MAAO,QACP,aAAc,QACd,iBAAkB,YAEpB,8BACE,MAAO,kBACP,aAAc,kBACd,iBAAkB,YAEpB,oCACE,MAAO,QACP,aAAc,QACd,iBAAkB,YAEpB,sCACE,MAAO,mBACP,aAAc,mBACd,iBAAkB,YAEpB,uCACE,MAAO,mBACP,aAAc,mBACd,iBAAkB,YAEpB,8BACE,MAAO,QACP,MAAO,KACP,OAAQ,KACR,OAAQ,EACR,QAAS,KAAK,KACd,QAAS,aACT,QAAS,EACT,UAAW,KACX,YAAa,KACb,eAAgB,OAChB,iBAAkB,YAClB,aAAc,EACd,aAAc,MACd,aAAc,YACd,cAAe,EACf,WAAY,KACZ,mBAAoB,KAEtB,oCACE,MAAO,QACP,aAAc,YACd,iBAAkB,YAEpB,oCACE,MAAO,QACP,aAAc,YACd,iBAAkB,YAEpB,uCACE,MAAO,mBACP,aAAc,YACd,iBAAkB,YAEpB,uBACE,OAAQ,EACR,QAAS,IACT,WAAY,KACZ,cAAe,IAEjB,sCACE,MAAO,KACP,MAAO,QACP,OAAQ,QACR,OAAQ,IACR,QAAS,KAAM,KAAM,KACrB,QAAS,aACT,SAAU,SACV,UAAW,SACX,WAAY,KACZ,YAAa,IACb,YAAa,KACb,YAAa,KACb,eAAgB,IAChB,iBAAkB,QAClB,aAAc,EACd,aAAc,MACd,aAAc,YACd,cAAe,IACf,WAAY,WAAW,MAAM,OAC7B,mBAAoB,WAAW,MAAM,OAEvC,4CACE,MAAO,QACP,iBAAkB,QAEpB,mDACE,OAAQ,IAAI,IAId,2BACE,OAAQ,QACR,MAAO,mBACP,MAAO,KACP,OAAQ,EACR,QAAS,IAAI,KAAK,IAAI,KACtB,QAAS,MACT,QAAS,GACT,SAAU,SACV,WAAY,KACZ,iBAAkB,KAClB,aAAc,EACd,aAAc,MACd,aAAc,QACd,cAAe,IACf,WAAY,EAAE,IAAI,IAAI,IAAI,cAAkB,CAAE,EAAE,EAAE,IAAI,IAAI,gBAC1D,mBAAoB,EAAE,IAAI,IAAI,IAAI,cAAkB,CAAE,EAAE,EAAE,IAAI,IAAI,gBAClE,WAAY,WAAW,MAAM,MAAM,CAAE,WAAW,MAAM,OACtD,mBAAoB,WAAW,MAAM,MAAM,CAAE,WAAW,MAAM,OAEhE,iCACE,IAAK,KACL,MAAO,KACP,MAAO,EACP,OAAQ,EACR,OAAQ,EACR,QAAS,EACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,aACT,SAAU,SACV,WAAY,IAAI,OAEhB,aAAc,IAAI,MAAM,YACxB,YAAa,IAAI,MAAM,YACvB,YAAa,KACb,WAAY,QAAQ,MAAM,MAAM,CAAE,UAAU,MAAM,OAClD,mBAAoB,QAAQ,MAAM,MAAM,CAAE,UAAU,MAAM,OAE5D,wCACA,wCACE,MAAO,KACP,OAAQ,EACR,WAAY,KACZ,eAAgB,IAElB,wCACE,MAAO,KACP,MAAO,mBACP,OAAQ,EAAE,IAAI,EAAE,EAChB,QAAS,EAAE,IAAI,EAAE,EACjB,QAAS,aACT,UAAW,SACX,YAAa,IACb,YAAa,KACb,YAAa,OACb,eAAgB,IAChB,aAAc,EAAI,IAAI,EAAE,EACxB,aAAc,MACd,aAAc,QACd,cAAe,EAEjB,wCACE,QAAS,MACT,SAAU,OACV,YAAa,OACb,cAAe,SAIjB,kCADA,gCADA,iCAGE,QAAS,GACT,WAAY,EAAE,IAAI,IAAI,IAAI,cAAkB,CAAE,EAAE,EAAE,IAAI,IAAI,QAC1D,mBAAoB,EAAE,IAAI,IAAI,IAAI,cAAkB,CAAE,EAAE,EAAE,IAAI,IAAI,QAIpE,wCADA,sCADA,uCAGE,QAAS,IAIX,+CAGA,+CAJA,6CAGA,6CAJA,8CAGA,8CAGE,QAAS,EAEX,kCACE,QAAS,GAEX,wCACE,QAAS,IACT,UAAW,eACX,eAAgB,eAChB,kBAAmB,eAErB,oCACE,OAAQ,YACR,WAAY,EAAE,EAAE,IAAI,IAAI,gBACxB,mBAAoB,EAAE,EAAE,IAAI,IAAI,gBAIlC,8BACE,IAAK,KACL,KAAM,EACN,MAAO,QACP,MAAO,KACP,WAAY,KACZ,OAAQ,KAAK,EAAE,EAAE,EACjB,QAAS,EACT,QAAS,GACT,QAAS,KACT,SAAU,OACV,SAAU,SACV,iBAAkB,KAClB,aAAc,EACd,aAAc,MACd,aAAc,QACd,cAAe,EAAE,EAAE,IAAI,IACvB,WAAY,EAAE,IAAI,IAAI,IAAI,cAAkB,CAAE,EAAE,EAAE,IAAI,IAAI,gBAC1D,mBAAoB,EAAE,IAAI,IAAI,IAAI,cAAkB,CAAE,EAAE,EAAE,IAAI,IAAI,gBAEpE,+CACE,MAAO,KACP,OAAQ,EACR,QAAS,EACT,QAAS,MACT,SAAU,SACV,aAAc,EAAE,EAAE,IAAI,EACtB,aAAc,MACd,aAAc,QACd,WAAY,EAAE,IAAI,IAAI,EAAE,eACxB,mBAAoB,EAAE,IAAI,IAAI,EAAE,eAElC,8CACE,MAAO,KACP,OAAQ,EACR,QAAS,IAAI,EACb,QAAS,MACT,WAAY,OACZ,WAAY,KAEd,8CACE,OAAQ,EACR,QAAS,KAAK,EACd,QAAS,MACT,UAAW,KACX,WAAY,OACZ,YAAa,KAEf,+CACE,IAAK,IACL,MAAO,KACP,MAAO,KACP,OAAQ,EACR,QAAS,IAAI,EACb,QAAS,GACT,QAAS,aACT,SAAU,SACV,WAAY,OAEd,iCACA,oCACE,MAAO,KACP,OAAQ,EACR,QAAS,EACT,QAAS,MACT,SAAU,SACV,WAAY,KACZ,UAAW,KACX,YAAa,KACb,eAAgB,IAElB,oCACE,MAAO,QACP,QAAS,IAAI,KAAK,IAAI,KACtB,UAAW,KACX,WAAY,KACZ,YAAa,KACb,YAAa,IAEf,kDACE,WAAY,IAEd,iDACE,cAAe,IAEjB,mDACE,MAAO,kBACP,OAAQ,QACR,OAAQ,IAAI,EAAE,EAAE,EAChB,aAAc,KACd,UAAW,KACX,YAAa,KAEf,0DACE,MAAO,MACP,WAAY,KACZ,QAAS,EAEX,iDACE,QAAS,EAEX,oDACE,OAAQ,QACR,MAAO,QAET,2DACE,IAAK,EACL,KAAM,EACN,MAAO,KACP,OAAQ,KACR,OAAQ,EACR,QAAS,EACT,QAAS,GACT,QAAS,aACT,QAAS,GACT,QAAS,EACT,SAAU,SACV,eAAgB,IAChB,kBAAmB,UACnB,oBAAqB,OAAO,OAC5B,WAAY,QAAQ,KAAK,OACzB,mBAAoB,QAAQ,KAAK,OAEnC,wEACE,MAAO,mBACP,MAAO,KACP,OAAQ,EACR,QAAS,EACT,QAAS,MACT,UAAW,KACX,WAAY,KACZ,YAAa,KACb,eAAgB,IAGlB,0DADA,0DAEE,MAAO,QAGT,8EADA,8EAEE,MAAO,QAET,uCACE,IAAK,KACL,OAAQ,KACR,OAAQ,EAAE,EAAE,KAAK,EACjB,cAAe,IAAI,IAAI,EAAE,EAG3B,2DADA,2DAEE,QAAS,KAGX,2DACE,iBAAkB,sRAGpB,iEADA,iEAEE,QAAS,GAEX,6DACE,MAAO,QACP,iBAAkB,KAEpB,oEACE,QAAS,IACT,iBAAkB,sRAEpB,iFACE,MAAO,QAGT,mFADA,mFAEE,QAAS,IACT,iBAAkB,+WAGpB,gGADA,gGAEE,MAAO,QAET,oDACE,WAAY,IAAI,IAAK,QAGvB,0DADA,0DAEE,WAAY,IAAI,IAAK,KACrB,iBAAkB,QAGpB,6DADA,6DAEE,OAAQ,YACR,MAAO,kBACP,YAAa,EAAI,IAAI,EAAI,oBAAwB,CAAE,EAAI,KAAK,EAAI,eAChE,iBAAkB,QAGpB,oEADA,oEAEE,QAAS,IACT,iBAAkB,6gBAGpB,iFADA,iFAEE,MAAO,kBAGT,oEACE,iBAAkB,0XAEpB,6EACE,iBAAkB,maAGpB,mFADA,mFAEE,iBAAkB,yWAGpB,6EADA,6EAEE,iBAAkB"} -------------------------------------------------------------------------------- /samples/README.md: -------------------------------------------------------------------------------- 1 | # Using samples within SAS Visual Analytics 2 | 3 | For quick testing purposes, these samples can be used by Data-Driven Content (DDC) objects within a SAS Visual Analytics (VA) report directly from GitHub, without the need of deploying them in a Web server, or SAS Content Server, or the DDC Server. For example, to reference the circle packing sample, set the URL of the DDC object to be: 4 | 5 | ```html 6 | https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/d3_circlePacking.html 7 | ``` 8 | --- 9 | ### Notes: 10 | 1. Due to recent [security measures for sandboxed iframes](https://www.chromestatus.com/feature/5706745674465280) adopted by Chrome browsers that removed download capability, `export2CSV.html` will only work with Chrome in VA 8.5.1 and above. 11 | 2. Example `d3_FunnelChart.html` requires `d3-funnel.js`. This funnel chart implementation was obtained from https://github.com/jakezatecky/d3-funnel 12 | 13 | # Sample Visualizations for Data-Driven Content Objects 14 | 15 | ### C3 Bar Chart | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/c3_BarChart.html) 16 | 17 | 18 | 19 | ### D3 Bar Chart | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_BarChart.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/d3_BarChart.html) 20 | 21 | 22 | 23 | ### Google Bar Chart | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/google_BarChart.html) 24 | 25 | 26 | 27 | ### D3 Circle Packing | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_circlePacking.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/d3_circlePacking.html) 28 | 29 | 30 | 31 | ### D3 Funnel Chart | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_FunnelChart.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/d3_FunnelChart.html) 32 | 33 | 34 | 35 | ### D3 Network Diagram | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_NetworkDiagram.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/d3_NetworkDiagram.html) 36 | 37 | 38 | 39 | ### D3 Radial Stacked Bar | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_radialStackedBar.html) 40 | 41 | 42 | 43 | ### D3 Spiral Heatmap | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_spiralHeatmap.html) 44 | 45 | 46 | 47 | ### D3 Spiral Plot | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/d3_spiralPlot.html) 48 | 49 | 50 | 51 | ### Data Update | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/dataUpdate.html) | [Code.v4](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/dataUpdate.v4.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/dataUpdate.html) 52 | 53 | 54 | 55 | ### Export to CSV | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/export2CSV.html) 56 | 57 | 58 | 59 | ### Google Calendar | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/google_Calendar.html) 60 | 61 | 62 | 63 | ### Google Organizational Chart | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/google_OrgChart.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/google_OrgChart.html) 64 | 65 | 66 | 67 | ### Highcharts | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/highcharts.html) | [Demo](https://sassoftware.github.io/sas-visualanalytics-thirdpartyvisualizations/samples/highcharts.html) 68 | 69 | 70 | 71 | ### JSON Message Viewer | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/jsonDataViewer.html) 72 | 73 | 74 | 75 | ### Multi Selector | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/multiSelector.html) 76 | 77 | 78 | 79 | ### Tree Selector | [Code](https://github.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/blob/master/samples/treeSelector.html) 80 | 81 | 82 | -------------------------------------------------------------------------------- /samples/c3_BarChart.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 48 | 49 | 50 | 51 | 52 | 130 | 131 |
132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /samples/d3_BarChart.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 86 | 87 |
88 | 89 | 321 | 322 | 323 | -------------------------------------------------------------------------------- /samples/google_BarChart.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 43 | 44 | 104 | 105 | 106 | 107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /samples/google_Calendar.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 43 | 44 | 140 | 141 | 142 | 143 |
144 | 145 | 146 | -------------------------------------------------------------------------------- /samples/google_OrgChart.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 44 | 45 | 155 | 156 | 157 | 158 |
159 | 160 | 161 | -------------------------------------------------------------------------------- /samples/images/c3_BarChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/c3_BarChart.png -------------------------------------------------------------------------------- /samples/images/d3_BarChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_BarChart.png -------------------------------------------------------------------------------- /samples/images/d3_FunnelChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_FunnelChart.png -------------------------------------------------------------------------------- /samples/images/d3_NetworkDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_NetworkDiagram.png -------------------------------------------------------------------------------- /samples/images/d3_circlePacking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_circlePacking.png -------------------------------------------------------------------------------- /samples/images/d3_radialStackedBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_radialStackedBar.png -------------------------------------------------------------------------------- /samples/images/d3_spiralHeatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_spiralHeatmap.png -------------------------------------------------------------------------------- /samples/images/d3_spiralPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/d3_spiralPlot.png -------------------------------------------------------------------------------- /samples/images/dataUpdate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/dataUpdate.png -------------------------------------------------------------------------------- /samples/images/export2CSV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/export2CSV.png -------------------------------------------------------------------------------- /samples/images/google_BarChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/google_BarChart.png -------------------------------------------------------------------------------- /samples/images/google_Calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/google_Calendar.png -------------------------------------------------------------------------------- /samples/images/google_OrgChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/google_OrgChart.png -------------------------------------------------------------------------------- /samples/images/highcharts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/highcharts.gif -------------------------------------------------------------------------------- /samples/images/jsonDataViewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/jsonDataViewer.png -------------------------------------------------------------------------------- /samples/images/multiSelector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/multiSelector.jpg -------------------------------------------------------------------------------- /samples/images/treeSelector.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sassoftware/sas-visualanalytics-thirdpartyvisualizations/04f69f683ada9a1389356e255eb47519cbd0c5ce/samples/images/treeSelector.gif -------------------------------------------------------------------------------- /samples/jsonDataViewer.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 64 | 65 | 100 | 101 | 102 | 103 |
104 | 105 | 106 | -------------------------------------------------------------------------------- /samples/multiSelector.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /thirdPartyHelpers/c3.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 SAS Institute Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | (function (window) { 17 | 'use strict'; 18 | 19 | /** 20 | * To be used with the c3 javascript library (http://c3js.org/) 21 | */ 22 | 23 | var c3Helper = {}; 24 | 25 | /** 26 | * 27 | */ 28 | c3Helper.configureChartData = function(resultData, chartType, previousConfig) 29 | { 30 | var chartData = {rows:[[]]}; 31 | chartData.type = chartType; 32 | 33 | if (!resultData) 34 | return chartData; 35 | 36 | var columnInfo = resultData.columns; 37 | var values = []; 38 | var columnLabelsArray = []; 39 | 40 | if (columnInfo) 41 | { 42 | for (var i = 0; i < columnInfo.length; i++) 43 | { 44 | var colInfo = columnInfo[i]; 45 | if (colInfo.type == "number") 46 | { 47 | values.push(colInfo.label); 48 | } 49 | else 50 | { 51 | if (!chartData.x) 52 | chartData.x = colInfo.label; 53 | } 54 | 55 | columnLabelsArray.push(colInfo.label); 56 | } 57 | } 58 | 59 | var shouldUnload = false; 60 | if (previousConfig) 61 | { 62 | if (previousConfig.x && previousConfig.x != chartData.x) 63 | shouldUnload = true; 64 | if (previousConfig.keys && previousConfig.keys.value) 65 | { 66 | if (previousConfig.keys.value.length != values.length) 67 | shouldUnload = true; 68 | else 69 | { 70 | for (var value of values) 71 | { 72 | if (previousConfig.keys.value.indexOf(value) == -1) 73 | { 74 | shouldUnload = true; 75 | break; 76 | } 77 | } 78 | } 79 | } 80 | } 81 | 82 | if (resultData.data) 83 | { 84 | chartData.rows = resultData.data; 85 | if (columnLabelsArray) 86 | { 87 | chartData.rows.splice(0, 0, columnLabelsArray); 88 | } 89 | } 90 | chartData.keys = {x: chartData.x, value: values}; 91 | 92 | console.log("shouldUnload = " + shouldUnload); 93 | if (shouldUnload) 94 | chartData.unload = shouldUnload; 95 | 96 | return chartData; 97 | }; 98 | 99 | if (!window.va) 100 | window.va = {}; 101 | window.va.c3Helper = c3Helper; 102 | 103 | })(window); -------------------------------------------------------------------------------- /thirdPartyHelpers/d3.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 SAS Institute Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | (function (window) { 17 | 'use strict'; 18 | 19 | var d3Helper = {}; 20 | 21 | d3Helper.configureFormatter = function(resultData) 22 | { 23 | if (!resultData) 24 | return; 25 | 26 | var formatter = {}; 27 | var columnInfo = resultData.columns; 28 | if (columnInfo) 29 | { 30 | for (var i = 0; i < columnInfo.length; i++) 31 | { 32 | var colInfo = columnInfo[i]; 33 | if (colInfo.type == "number") 34 | { 35 | if (colInfo.format) 36 | { 37 | if (colInfo.format.name == "DOLLAR") 38 | formatter[colInfo.label] = d3.format("$" + colInfo.format.width + ",." + colInfo.format.precision + "f"); 39 | else if (colInfo.format.name == "COMMA") 40 | formatter[colInfo.label] = d3.format(colInfo.format.width + ",." + colInfo.format.precision + "f"); 41 | else if (colInfo.format.name == "F" || colInfo.format.name == "BEST") 42 | formatter[colInfo.label] = d3.format(colInfo.format.width + "." + colInfo.format.precision + "f"); 43 | else if (colInfo.format.name == "PERCENT") 44 | formatter[colInfo.label] = d3.format(colInfo.format.width + ",." + colInfo.format.precision + "%"); 45 | } 46 | } 47 | } 48 | } 49 | return formatter; 50 | }; 51 | 52 | d3Helper.configureAxisFormatter = function(resultData) 53 | { 54 | if (!resultData) 55 | return; 56 | 57 | var formatter = {}; 58 | var columnInfo = resultData.columns; 59 | if (columnInfo) 60 | { 61 | for (var i = 0; i < columnInfo.length; i++) 62 | { 63 | var colInfo = columnInfo[i]; 64 | if (colInfo.type == "number") 65 | { 66 | if (colInfo.format) 67 | { 68 | if (colInfo.format.name == "DOLLAR") 69 | formatter[colInfo.label] = d3.format("$" + colInfo.format.width + "," + "f"); 70 | else if (colInfo.format.name == "COMMA") 71 | formatter[colInfo.label] = d3.format(colInfo.format.width + "," + "f"); 72 | else if (colInfo.format.name == "F" || colInfo.format.name == "BEST") 73 | formatter[colInfo.label] = d3.format(colInfo.format.width + "f"); 74 | else if (colInfo.format.name == "PERCENT") 75 | formatter[colInfo.label] = d3.format(colInfo.format.width + "," + "%"); 76 | } 77 | } 78 | } 79 | } 80 | return formatter; 81 | }; 82 | 83 | if (!window.va) 84 | window.va = {}; 85 | window.va.d3Helper = d3Helper; 86 | 87 | })(window); -------------------------------------------------------------------------------- /thirdPartyHelpers/google.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 SAS Institute Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | (function (window) { 17 | 'use strict'; 18 | 19 | var googleHelper = {}; 20 | 21 | googleHelper.createDataTable = function(resultData) 22 | { 23 | var arrayData; 24 | if (resultData.data) 25 | { 26 | arrayData = resultData.data; 27 | if (resultData.columns) 28 | { 29 | arrayData.splice(0, 0, resultData.columns); 30 | } 31 | } 32 | return google.visualization.arrayToDataTable(arrayData); 33 | }; 34 | 35 | googleHelper.formatData = function(dataTable, resultData) 36 | { 37 | if (!resultData || !dataTable) 38 | return; 39 | 40 | var columnInfo = resultData.columns; 41 | if (columnInfo) 42 | { 43 | for (var i = 0; i < columnInfo.length; i++) 44 | { 45 | var colInfo = columnInfo[i]; 46 | if (colInfo.format) 47 | { 48 | if (colInfo.format.name == "DOLLAR") 49 | { 50 | var formatter = new google.visualization.NumberFormat({ 51 | prefix: '$', 52 | fractionDigits: colInfo.format.precision 53 | }); 54 | formatter.format(dataTable, i); 55 | } 56 | else if (colInfo.format.name == "COMMA") 57 | { 58 | var formatter = new google.visualization.NumberFormat({ 59 | fractionDigits: colInfo.format.precision 60 | }); 61 | formatter.format(dataTable, i); 62 | } 63 | else if (colInfo.format.name == "F") 64 | { 65 | var formatter = new google.visualization.NumberFormat({ 66 | groupingSymbol: '', 67 | fractionDigits: colInfo.format.precision 68 | }); 69 | formatter.format(dataTable, i); 70 | } 71 | else if (colInfo.format.name == "PERCENT") 72 | { 73 | var pattern = '#,###'; 74 | if (colInfo.format.precision > 0) 75 | { 76 | pattern += "."; 77 | for (var j = 0; j < colInfo.format.precision; j++) 78 | pattern += "#"; 79 | } 80 | 81 | pattern += "%"; 82 | var formatter = new google.visualization.NumberFormat({ 83 | pattern: pattern 84 | }); 85 | formatter.format(dataTable, i); 86 | } 87 | else if (colInfo.format.name == "MONYY") 88 | { 89 | var formatter = new google.visualization.DateFormat({pattern: "MMMyyyy"}); 90 | formatter.format(dataTable, i); 91 | } 92 | else if (colInfo.format.name == "MMYY") 93 | { 94 | var formatter = new google.visualization.DateFormat({pattern: "MM/yyyy"}); 95 | formatter.format(dataTable, i); 96 | } 97 | else if (colInfo.format.name == "DATEN" || colInfo.format.formatString == "MMDDYY8") 98 | { 99 | var formatter = new google.visualization.DateFormat({pattern: "MM/dd/yyyy"}); 100 | formatter.format(dataTable, i); 101 | } 102 | else if (colInfo.format.formatString == "DATE9") 103 | { 104 | var formatter = new google.visualization.DateFormat({pattern: "ddMMMyyyy"}); 105 | formatter.format(dataTable, i); 106 | } 107 | else if (colInfo.format.formatString == "DATE11") 108 | { 109 | var formatter = new google.visualization.DateFormat({pattern: "MMM/dd/yyyy"}); 110 | formatter.format(dataTable, i); 111 | } 112 | else if (colInfo.format.formatString == "DDMMYY8") 113 | { 114 | var formatter = new google.visualization.DateFormat({pattern: "dd/MM/yyyy"}); 115 | formatter.format(dataTable, i); 116 | } 117 | else if (colInfo.format.formatString == "WORDDATE28") 118 | { 119 | var formatter = new google.visualization.DateFormat({formatType: "long"}); 120 | formatter.format(dataTable, i); 121 | } 122 | else if (colInfo.format.formatString == "YYMMDD8") 123 | {dd 124 | var formatter = new google.visualization.DateFormat({pattern: "yyyy/MM/dd"}); 125 | formatter.format(dataTable, i); 126 | } 127 | else if (colInfo.format.name == "DATETIME") 128 | { 129 | var formatter = new google.visualization.DateFormat({pattern: "ddMMMyyyy:HH:mm:ss"}); 130 | formatter.format(dataTable, i); 131 | } 132 | } 133 | } 134 | } 135 | }; 136 | 137 | googleHelper.formatAxis = function(axis, options, resultData) 138 | { 139 | if (!resultData || !options || !axis) 140 | return; 141 | 142 | var columnInfo = resultData.columns; 143 | if (columnInfo) 144 | { 145 | if (!options[axis]) options[axis] = {}; 146 | for (var i = 0; i < columnInfo.length; i++) 147 | { 148 | var colInfo = columnInfo[i]; 149 | if (colInfo.format) 150 | { 151 | if (colInfo.format.name == "DOLLAR") 152 | { 153 | options[axis].format = '$#,###'; 154 | } 155 | else if (colInfo.format.name == "COMMA") 156 | { 157 | options[axis].format = '#,###'; 158 | } 159 | else if (colInfo.format.name == "F" || colInfo.format.name == "BEST") 160 | { 161 | options[axis].format = '####'; 162 | } 163 | else if (colInfo.format.name == "PERCENT") 164 | { 165 | options[axis].format = 'percent'; 166 | } 167 | } 168 | } 169 | } 170 | }; 171 | 172 | if (!window.va) 173 | window.va = {}; 174 | window.va.googleHelper = googleHelper; 175 | 176 | })(window); -------------------------------------------------------------------------------- /util/contentUtil.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 SAS Institute Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | (function (window) { 17 | 'use strict'; 18 | 19 | var contentUtil = {}; 20 | 21 | contentUtil.setupResizeListener = function (callback) { 22 | var resizeEndEvent = document.createEvent("Event"); 23 | resizeEndEvent.initEvent("resizeEndEvent", false, true); 24 | 25 | //redraw graph when window resize is completed 26 | window.addEventListener('resizeEndEvent', function () { 27 | callback(); 28 | }); 29 | 30 | //create trigger to resizeEnd event 31 | window.addEventListener('resize', function () { 32 | if (this._timeoutID) 33 | clearTimeout(this._timeoutID); 34 | this._timeoutID = setTimeout(function () { 35 | window.dispatchEvent(resizeEndEvent); 36 | }, 25); 37 | }); 38 | } 39 | 40 | // Example of expectedTypes: ["string", "number", "date"] 41 | // Example of optionalTypes: ["string", "number", "date"] OR "string" OR "number" OR "date" OR [] OR null 42 | // 43 | contentUtil.validateRoles = function (resultData, expectedTypes, optionalTypes) { 44 | var columnsInfo = resultData.columns; 45 | var numCols = columnsInfo.length; 46 | // Check the required columns 47 | if (numCols < expectedTypes.length) return false; 48 | for (var c = 0; c < expectedTypes.length; c++) { 49 | if (columnsInfo[c].type !== expectedTypes[c]) return false; 50 | } 51 | // Check the optional columns (if any). 52 | if (numCols > expectedTypes.length) { 53 | if (optionalTypes === null) return false; 54 | if (typeof optionalTypes == "object") { // It's an array: (match each type in sequence or until one of the arrays end) 55 | for (var c = expectedTypes.length, i = 0; c < numCols && i < optionalTypes.length; c++, i++) { 56 | if (columnsInfo[c].type !== optionalTypes[i]) return false; 57 | } 58 | } 59 | else { // It's one single type: all remaining types must match that single type 60 | for (var c = expectedTypes.length; c < numCols; c++) { 61 | if (columnsInfo[c].type !== optionalTypes) return false; 62 | } 63 | } 64 | } 65 | return true; 66 | }; 67 | 68 | contentUtil.initializeSelections = function (resultData) { 69 | if (!resultData) 70 | return null; 71 | 72 | var columnsInfo = resultData.columns; 73 | var arrayData = resultData.data; 74 | var selections = []; 75 | // Remove the brush column as the brush column is used for knowing 76 | // whether a given row is selected or not, not something that should be handled to chart 77 | if (columnsInfo && arrayData) { 78 | for (var c = 0; c < columnsInfo.length; c++) { 79 | if ((columnsInfo[c].usage) && (columnsInfo[c].usage === "brush")) { 80 | // brush column: remove the column info 81 | columnsInfo.splice(c, 1); 82 | // for each row of data, check the bush column for indication of row selection 83 | for (var r = 0; r < arrayData.length; r++) { 84 | if (arrayData[r][c] !== 0) { 85 | // row r has been selected 86 | selections.push({ row: r }); 87 | } 88 | // remove the value of the brush column from the row being processed 89 | arrayData[r].splice(c, 1); 90 | } 91 | } 92 | } 93 | } 94 | return selections; 95 | }; 96 | 97 | contentUtil.convertDateColumns = function (resultData) { 98 | if (!resultData) 99 | return; 100 | 101 | var columnsInfo = resultData.columns; 102 | var arrayData = resultData.data; 103 | for (var c = 0; c < columnsInfo.length; c++) { 104 | var colInfo = columnsInfo[c]; 105 | if (colInfo) { // <--- just to be safe 106 | if (colInfo.type == "date") { 107 | for (var r = 0; r < arrayData.length; r++) { 108 | var dateStr = arrayData[r][c].trim(); 109 | 110 | // One of the Date() constructors accept dates as strings in ISO format as input, such as: 111 | // "02/12/2012", "Feb/12/2012", "February 12, 2012", "12Feb2012", "Sunday, February 12, 2012", "2012/02/12" 112 | // (support for some of those formats may be browser vendor and version dependent). 113 | // It does NOT accept Julian neither DD/MM/YYYY formats. In those cases, a transformation is necessary 114 | // to put the date string in a supported format. 115 | 116 | // There is room for a lot of improvement here. 117 | if (colInfo.format && colInfo.format.formatString == "DDMMYY8") { 118 | dateStr = dateStr.substr(6) + '-' + dateStr.substr(3, 2) + '-' + dateStr.substr(0, 2); // = YYYY-MM-DD (international standard) 119 | } 120 | else if (colInfo.format && colInfo.format.formatString == "JULIAN7") { 121 | // This is just a placeholder. Need code for this transformation. 122 | } 123 | else if (colInfo.format && colInfo.format.formatString == "DATE9") { //DDMMMYY 124 | dateStr = dateStr.substr(0, 2) + ' ' + dateStr.substr(2, 3) + ' ' + dateStr.substr(5); // = DD MMM YY 125 | } 126 | // Other transformations should be added here as needed. 127 | 128 | arrayData[r][c] = new Date(dateStr); 129 | } 130 | } 131 | } 132 | } 133 | }; 134 | 135 | // Returns the object: {:, ... , :} 136 | // If has multiple values, is an array 137 | contentUtil.getVAParameters = function (resultData) { 138 | var parameters = {}; 139 | if (resultData.parameters) { 140 | resultData.parameters.forEach(function (parameter, index) { 141 | parameters[parameter.label] = parameter.value; 142 | }); 143 | } 144 | return parameters; 145 | }; 146 | 147 | if (!window.va) 148 | window.va = {}; 149 | window.va.contentUtil = contentUtil; 150 | 151 | })(window); -------------------------------------------------------------------------------- /util/messagingUtil.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 SAS Institute Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | (function (window) { 17 | 'use strict'; 18 | 19 | var messagingUtil = {}; 20 | 21 | messagingUtil.setOnDataReceivedCallback = function (callback) { 22 | var onMessage = function (evt) { 23 | if (evt && evt.data && evt.data.hasOwnProperty("data")) { 24 | callback(evt.data); 25 | } 26 | } 27 | 28 | if (window.addEventListener) { 29 | // For standards-compliant web browsers 30 | window.addEventListener("message", onMessage, false); 31 | } 32 | else { 33 | window.attachEvent("onmessage", onMessage); 34 | } 35 | }; 36 | 37 | 38 | // Examples of valid selectedRows: 39 | // [0, 3, 4] 40 | // [{row: 0}, {row: 3}, {row: 4}] 41 | messagingUtil.postSelectionMessage = function (resultName, selectedRows) { 42 | var selections; 43 | if (selectedRows && selectedRows.length > 0 && selectedRows[0].hasOwnProperty("row")) { 44 | selections = selectedRows; 45 | } 46 | else { 47 | selections = []; 48 | selectedRows.forEach(function (selRow) { 49 | selections.push({ row: selRow }); 50 | }); 51 | } 52 | 53 | var message = { 54 | resultName: resultName, 55 | selections: selections 56 | }; 57 | messagingUtil.postMessage(message); 58 | }; 59 | 60 | 61 | messagingUtil.postInstructionalMessage = function (resultName, strMessage) { 62 | var message = { 63 | resultName: resultName, 64 | message: strMessage 65 | }; 66 | messagingUtil.postMessage(message); 67 | }; 68 | 69 | 70 | messagingUtil.postMessage = function (objMessage) { 71 | var url = (window.location != window.parent.location) 72 | ? document.referrer 73 | : document.location.href; 74 | 75 | window.parent.postMessage(objMessage, url); 76 | }; 77 | 78 | 79 | messagingUtil.getUrlParams = function (name) { 80 | // If name is a parameter --> return name's value 81 | // If name is not a parameter --> return null 82 | // If name is not informed --> return object with all parameters: {name1:value1, name2:value2, name3:value3, ...} 83 | var params = {}; 84 | var search = window.location.search.slice(window.location.search.indexOf('?') + 1); 85 | var name_value = search.split('&'); 86 | 87 | name_value.forEach(function (pair, key) { 88 | if (pair.indexOf('=') === -1) { 89 | params[pair] = ""; 90 | } 91 | else { 92 | params[decodeURIComponent(pair.substr(0, pair.indexOf('=')))] = decodeURIComponent(pair.substr(pair.indexOf('=') + 1)); 93 | } 94 | }); 95 | 96 | return name ? (name in params ? params[name] : null) : params; 97 | }; 98 | 99 | 100 | messagingUtil.forceVAObjectsRefresh = function (resultName, millisecondsBeforeRefresh = 2000) { 101 | // Forces VA objects that have filter actions driven from the DDC object to refresh: filters 1st row then none of them 102 | // For this function to work you need additional settings in the VA report 103 | va.messagingUtil.postSelectionMessage(resultName, [{ row: 0 }]); 104 | 105 | return new Promise((resolve, reject) => { 106 | // You may need to tune the parameter millisecondsBeforeRefresh for your environment 107 | setTimeout( 108 | () => { 109 | va.messagingUtil.postSelectionMessage(resultName, []); 110 | resolve(); 111 | }, 112 | millisecondsBeforeRefresh 113 | ); 114 | }); 115 | }; 116 | 117 | 118 | if (!window.va) 119 | window.va = {}; 120 | window.va.messagingUtil = messagingUtil; 121 | 122 | })(window); 123 | --------------------------------------------------------------------------------