Is it possible to generate dynamic created content into the [data-text] attribute on a tweet?

I have a page on my site where users can change different dropdowns create a calculation. I want them to be able to say I added x (substance 1) + y(substance 2) and got z (result) … Is that possible? It’s essentially adding 3 variables and creating 1 javascript string. I’m just not sure if it’s possible to add that into the data-text string.