Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass variables to chartjs or vegalite from command line. #122

Open
cerebroo opened this issue Mar 21, 2019 · 2 comments
Open

Pass variables to chartjs or vegalite from command line. #122

cerebroo opened this issue Mar 21, 2019 · 2 comments

Comments

@cerebroo
Copy link

Thanks for such a great package.

We can pass variables to pug from command line. But is it somehow possible to further pass those variables to vegalite or chartjs files?

My use case is to programatically generate PDFs with same layout but slightly different text in html and different data in charts.

@Zulko
Copy link
Member

Zulko commented Mar 24, 2019

I'm not sure I understand the full use case, could you provide more details ?

@cerebroo
Copy link
Author

cerebroo commented Mar 25, 2019

@Zulko - Our users login to our web dashboard and select a month and and a particular salesman and and hit export report button. We want to use ReLaXed to export sales activity of select salesman for selected month in a pdf. Irrespective of selected month and selected salesman, the design of pdf will be same but:

  1. Some text in pdf e.g. salesman's name, month and sales numbers will differ. We can achieve this by passing this data as json through commandline.
  2. We will use chartjs for charts in pdfs and data in these charts will differ based on selected salesman and selected month. So if we can somehow pass the data through command line to chartjs file as well just like we pass it to pug file, that will be awesome.

Hope I have done a better job in explaining my use case this time.

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

No branches or pull requests

2 participants