Some Charting Questions

Is it not possible to use a formula to create a chart? I’ve tried various degrees of building the chart formula with all or part in a variable, but it always displays an error with exactly what works if entered literally, which is also the exact content of the variable:

Web browser URL is malformed: chart(“Women,123;Men,131”,“chart”,“pie”)

A right-click on the WebBrowser object shows this as the value of the object, yet the error is displayed.

It can be updated by changing the Blueprint via the procedure.

Also, is there any way to set a WebBrowserObject so that its background is transparent and not opaque?

I’m guessing that perhaps by now you’ve already figured out why this doesn’t work. The only graphic object that allows a formula to be put into a variable is the Text Display object, and that is only when using the Evaluate Formula Twice option. The Web Browser object does not have this option (neither does any other kind of object).

You are passing the value


to the Web Browser object. That is not valid HTML, and it is not a valid URL. So the reported error message is exactly right.


I’ll bet the formulavalue( function would work. You could use formulavalue(theVariable) where

theVariable = {chart("Women,123;Men,131","chart","pie"}
1 Like

I think it will. I was out doing errands and thought of this, but Dave beat me to it! :grinning:

Yes, it works perfectly. Now I can have buttons representing a handful of variables already bearing calculated data. The buttons can change the type of chart and/or what it displays.

It’s also ideal for simply displaying the results of calculations versus values in the fields and cells.

This gives me exactly what I was trying to achieve after a procedure does some heavy lifting with the numbers.

When I tried to use plotly-2.12.1.min.js to build other styles of plotly charts it was necessary to build an entire html page in a variable. formulavalue(theVariable) failed to work in my first attempts. Maybe with more effort on my part it would have. But I did find another way to get where I needed to be by changing the blueprint of the Web Browser object. It’s plenty fast and works just fine.

SelectObjects ObjectInfo(“Name”) = “ScoreGauge”
ChangeObjects “$Formula”,lvScoreChart

Without a heck of a lot of extra effort, anything Plotly offers is readily generated in Panorama forms.

Screen Shot 2022-06-20 at 4.33.54 PM

What a great capability the Web Browser has added to Panorama!

FYI, your code is needlessly complicated. This one line should do it.

changeobject "ScoreGuage","formula",lvScoreChart

That said, I don’t know why formulavalue( wouldn’t also work. But as you say, this is pretty easy.

As you have discovered, what I implemented in Panorama only scratches the surface of what plotly.js offers!

Okay, I’ll take my overly complicated three lines and chop 'em down to one. :stuck_out_tongue_winking_eye:

And I’ll correct my spelling of gauge even though it doesn’t affect a thing.

Oh, I didn’t even notice that I typed it differently!

Obviously 3 lines isn’t overly complicated. But if you had to change a dozen objects, it adds up, and I know that many aren’t aware of the changeobject statement, which is new to Panorama X. So I wanted to point it out.