make some plots in application designer

GP30
GP30 Registered Posts: 7

Hello,

I'm creating an application. I have created some tiles (edit project variables). I clicked on "Use custom UI," then I added some Python code (I have created a dataframe) in the Python helper code section.

Now, I want to display some graphics on the app interface (some plots). Is it possible to do that?

Best Answer

  • Sarina
    Sarina Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 317 Dataiker
    Answer ✓

    Hi @GP30
    ,

    Indeed, you would likely need to save the histograms as images, and reference the existing image files in order to display them in your application UI. You can of course try other methods, but this seems like the most straightforward.

    Thank you,
    Sarina

Answers

  • Sarina
    Sarina Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 317 Dataiker
    edited July 17

    Hi @GP30
    ,

    You can use the HTML section to display images in your custom UI, provided you save your plots as images. I think it would be easiest to:
    - Save your plots as image files
    - Load your place image files into Global Shared Code > Static Web Resources, so that you can reference any files at:

    /local/static/<IMAGE_FILE.JPG>

    - In your HTML form you can simply add an img tag to any existing HTML form data like so:

    <img src='/local/static/cat-red-cute-animals-29a995-1024.jpg'>


    For example:

    Screenshot 2024-06-11 at 4.23.41 PM.png

    Edit variable tile: 

    Screenshot 2024-06-11 at 4.23.51 PM.png


    I hope that helps!

    Thank you,
    Sarina

  • GP30
    GP30 Registered Posts: 7

    I'm sorry but i was thinking about making some histograms...

Setup Info
    Tags
      Help me…