Emailing vega chart - email

Is there any way I can send vega chart in email from server side? Say from a spring boot app? I have the vega spec saved in db and I can fill up data as well from the server side, was wondering how I can use this to send out an email with the chart.
Vega embed won’t work as most of the email clients filter out script tags from body.
I tried vega-cli too but since it’s based on nodejs libs I could not integrate it with my spring boot.
Appreciate any help find a solution here.

As discussed on slack, I think for email, the best solution is to create a bitmap (e.g., PNG) and include it since you can't really run JS on email clients.
You can optionally provide a link to a hosted page too (esp. if your chart is interactive since the PNGs won’t be interactive obviously).

Related

Content Management in Bluemix

Is it possible to link a bluemix website with some kind of content mangement?
I'm trying to build a formular for an event registration website with bluemix.
It must be possible for the promoter of the events to decide which data the participants have to fill out. As an example for a business dinner there is no need to ask if he needs a flight or not and for another event it would be necessary to know it. So the content must be "adaptable" by the promoter because I don't want to write a new website for each event.
Does somebody know a solution for this problem?
Thank you very much for your help!
Deploy your site on IBM Containers and utilize the ssh capability to scp your content into the web app/site.
There are several possibilities:
create an application with a Cloudant backend. The data stored inside is free form. You then "just" need to define the valid form. I used angular.js and angular-formly (with the form definition stored in Cloudant, so you can edit it)
Use PencilBlue a Node.js CMS using a Mongo backend. Eventually it does all you need
Use a container with a common engine (e.g. Wordpress)
So you can act depending on how custom you want the solution to be. Let us know what works for you

Understanding data privacy with Google Web Toolkit, and Google Charts

I have been playing around with GWT and GWT Visualization Wrapper API. One thing I learned recently is that GWT Visualization API does not work without an internet connection (I was working offline the other day and it took me a good half hour to figure out why my charts were not loading)
After doing a lot of reading online about privacy, data, and GWT, it seems that many people, including me, have a concern about sending data to Google when trying to display graphs. I already searched through many sources, including stackoverflow, and I would like to 100% confirm that my assumptions are correct.
The reason for people's concern about sending data to Google was when you tried to get an image of the said chart. This required data to be sent to Google, they processed it, and then they returned an image to be embedded in your website. According to my studies, that feature has been deprecated from Google charts (and for good reason). The way it works now, to my understanding, is that every time you want to display a chart, you download the most up-to-date library on the client side and perform all the calculations on the client. This makes it so that Google doesn’t actually get any information you will display on the charts.
Thus, I can continue using the visualization API as long as I keep using interactive charts and keep checking on the Google charts documentation page that it says that for this particular chart i.e Line Chart:
https://developers.google.com/chart/interactive/docs/gallery/linechart
(SEE BOTTOM OF PAGE) “All code and data are processed and rendered in the browser. No data is sent to any server” I do not have to worry about anyone getting my data because all information is processed client side.
Please correct any incorrect assumptions that I may have. Thank you.
The charts on this page, https://developers.google.com/chart/interactive/docs/gallery, all include a "Data Policy" section which details whether the chart is rendered on the client and what data will leave the client. Currently, only GeoChart communicates with Google (in order to do the Geocoding); obviously, this could change in the future.
The charts on this other page, https://developers.google.com/chart/interactive/docs/more_charts, include some that were written by Google, and some that were written by third parties. These also include a Data Policy section. For those written by Google, you can rely on this policy. For those written by third parties, Google has not validated the claims and cannot guarantee them.

Looking for an email/report templating engine with database backend - for end-users

We have a number of customers that we have to send monthly invoices too. Right now, I'm managing a codebase that does SQL queries against our customer database and billing database and places that data into emails - and sends it.
I grow weary of maintaining this every time we want to include a new promotion or change our customer service phone numbers. So, I'm looking for a replacement to move more of this into the hands of those requesting the changes.
In my ideal world, I need :
A WYSIWYG (man, does anyone even say that anymore?) email editor that generates templates based upon the output from a Database Query.
The ability to drag and drop various fields from the database query into the email template.
Display of sample email results with the database query.
Web application, preferably not requiring IIS.
Involve as little code as possible for the end-user, but allow basic functionality (i.e. arrays/for loops)
Either comes with it's own email delivery engine, or writes output in a way that I can easily write a Python script to deliver the email.
Support for generic Database Connectors. (I need MSSQL and MySQL)
F/OSS
So ... can anyone suggest a project like this, or some tools that'd be useful for rolling my own?
(My current alternative idea is using something like ERB or Tenjin, having them write the code, but not having live-preview for the editor would suck...)
I think your looking for a reporting tool which is also capable of sending email. Sending a generared report in html or pdf shouldn't be to hard to do as well.
I've used JasperReports in the past for which I think it should fit your needs.
Another good solution is the pentaho reporting tool
You could easily write something on your own.. give them a basic edit control and allow them to use psuedo variables like {customername} {anothercustomerattribute} within the mail body.
On submit either send directly or save as template.
When the template is sent away the script automatically parses stuff like {customername} into the real customers name from the database.
Your own very very simple custom scriptlanguage :)
Everything else like loops and so on would be maintained on serverside. And if you want particular groups of customers to receive the letter, allow the enduser to select from selectboxes or whatever and do the rest on the serverside with pre-defined rules.

Yahoo Finance API like chart

I want to create a chart very similar to yahoo Finance interactive chart in a .NET application. The interactive chart on Yahoo finance is not included in their developer API. Has anyone tried to leverage their API to create a similar chart? Although the chart is very much like the one used on Yahoo, the data used for my analysis is not Stock data. So, I will not be able to call the Yahoo Url by feeding any query params.
Any suggestions?
If your looking at a web based chart, the flot graphs for jQuery are a good option IMHO. They look pretty schnazzy, are interactive and are very simple to get working.
http://plugins.jquery.com/project/flot
amCharts Stock chart is of the same breed. It's Flash based but you can easily use it with any server side engine. Not sure whether you are looking for web or windows solution though.
You might consider Infragistics Web Charts also.

Serve a form without a web interface

Anyone doing any work using "offline" forms? We have an application that requires inputting data from outside our company. I was thinking about sending a form out via email, allowing the form to be filled out then sent back. Obviously a web application would be the best solution, but management doesn't seem ready to build the infrastructure and security to support that. I've read a little about PDF forms is that a good solution or are there other solutions?
Have you considered InfoPath? These can be created and distributed through email. And then the data can be collated automatically.
Also, consider using Google Spreadsheets with Google Forms. It's free and infrastructure is outsourced.
PDF forms can work as well.
Another possibility is to use Microsoft SharePoint. If your company uses Microsoft Office for the people filling the forms you referring to, you could deploy an Office based solution and gather information with Sharepoint Server.
Check this link out.