BookmarkSubscribeRSS Feed
Calcite | Level 5

There are many JavaScript libraries a SAS user can use to create beautiful interactive charts quickly. I wrote a paper a while back in doing this using D3. Now I have created a GitHub repository with various SAS macros I have for creating charts in HTML if anyone wants to use them. Currently, this has only macros for Google Charts but I will be adding various D3 and other JS visualization macros.


Have fun visualizing at will!







Super User

That looks awesome! Well done. Is there a way to add multiple graphs to the same HTML file and/or adding text in between? 


EDIT: some don't work, like the timeline one. Also, just a heads up, you can read your code directly from GitHub, you don't need to have the code locally as well in myfolders. It'll make your GitHub code, copy/paste/run rather than having to worry about downloading the macro files. This way, we can ensure we're using the latest version of your code without manually maintaining links 😉

%let source_path =;

filename reprex url "&source_path";
%include reprex;
filename reprex;
Calcite | Level 5

You can use HTML iframes to combine multiple charts into a single view or a set of slides after having created each one. I will be creating an example showing how to do it.


Good tip on directly reading the macro from GitHub. For anyone who wants to take that route, the code is

filename hzggmacr url "";
%include hzggmacr;

Which timeline example isn't working? I had typos on a few of the example links and had fixed them.




Super User
They're all working now 🙂



SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.

Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2 in conversation