Jump to content

apreble

Members
  • Posts

    21
  • Joined

  • Last visited

Converted

  • country
    US
  • productofinterest
    Visual Analytics - Spotfire

Recent Profile Visitors

69 profile views

apreble's Achievements

Apprentice

Apprentice (3/14)

  • Reacting Well Rare
  • One Month Later
  • Collaborator Rare
  • Week One Done
  • First Post

Recent Badges

2

Reputation

  1. @barchiel33 thank you so much for the help on this, this worked perfectly! The structure of the javascript looks much better and seems cleaner on your version too. Thanks again!
  2. Hello, I'm using information from the link I've attached... I really like the vertical menu option for ability for users to navigate to a page. However, when I apply my Spotfire action control links, the button labels will change. For example the "Action Control Link 1" now corresponds with the 2nd icon when the pop up happens. There seems to be no order here after the action control links are applied. How can this be fixed? Here's the HTML from the link with one of my action controls applied- <div class="iconMenu" style="background:yellow;color:blue;font-size:50px;"> <a><SpotfireControl id="65b85707c5bd4da3843ca67d153e45e4" /></a> //This one doesn't correspond to the button labeled "1" <a>Action Control Link 2</a> <a>Action Control Link 3</a> <a>Action Control Link 4</a> <a>Action Control Link 5</a> <a>Action Control Link 6</a> <a>Action Control Link 7</a> <a>Action Control Link 8</a> <a>Action Control Link 9</a> <a>Action Control Link 10</a> <a>Menu</a> </div> <img class="icons fa-solid fa-1, fa-solid fa-2,fa-solid fa-3,fa-solid fa-4,fa-solid fa-5,fa-solid fa-6,fa-solid fa-7,fa-solid fa-8,fa-solid fa-9, fa-solid fa-0, fa-solid fa-bars"/> Here's a visual of what happens when I apply my action control link (See how the link corresponds to button #2 and it should correspond to button #1)- Here's the Javascript from the link- spaceBetweenLayers = 40; itemsPerLayer = 1; startingAngle = 0 endingAngle= 120 canvasPos = document.querySelector('[class^="sfx_canvas"]').getBoundingClientRect() ; iconMenu = document.querySelector(".iconMenu").style backgroundColor= iconMenu.background || "#fff"; foregroundColor = iconMenu.color || "navy"; fontSize = iconMenu.fontSize || "20px"; style = ` <link href='https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.css' rel='stylesheet' ></link> <link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css' rel='stylesheet'/> <style> .iconMenu { position: fixed; top:${canvasPos.y+15}px; left:${canvasPos.x+15}px; z-index:1; height:0px; } .iconMenu a { position: fixed; display: flex; justify-content: center; align-items: center; text-decoration:none !important; cursor: pointer; /*animation*/ transition-timing-function: cubic-bezier(0,0,0,1); transition-duration: .25s; /*size and shape*/ width: ${fontSize}; height: ${fontSize}; padding: calc(${fontSize}/3); border-radius: 100%; /*colors*/ color:#747880 !important; background-color: ${backgroundColor}; box-shadow: 0 4px 18px #0000001a,0 4px 5px #0000001a; } .iconMenu a:last-child{ opacity:100% } .iconMenu a:hover{ color: #8498fa !important; } </style>` document.querySelector(".iconMenu").insertAdjacentHTML("afterend",style); //script timeOutPID=0; boxShadow = document.querySelector(".iconMenu a").style.boxShadow; function hover() { let gap = spaceBetweenLayers; let elements = document.querySelectorAll(".iconMenu a"); elements.forEach((e, i) => { if(i==elements.length-1) return; let angle = (endingAngle / itemsPerLayer) * (i%itemsPerLayer) + startingAngle; i%itemsPerLayer||(gap+=spaceBetweenLayers) e.style.transform = `rotate(${angle}deg) translate(${gap}px) rotate(-${angle}deg)`; e.style.boxShadow=boxShadow; e.onmouseover = resetDelayClose; e.onmouseout = delayClose; }); resetDelayClose(); } function close(){ let elements = document.querySelectorAll(".iconMenu a"); elements.forEach((e, i) => { if (i==elements.length-1) return; e.style.transform = `translate(0px)`; e.style.boxShadow="unset"; }); } function delayClose(){ timeOutPID = setTimeout(close,1234) } function resetDelayClose(){ timeOutPID && clearTimeout(timeOutPID); } document.querySelector(".iconMenu a:last-child").onmouseover = hover; document.querySelector(".iconMenu a:last-child").onmouseout = delayClose; //setup icons on links icons = document.querySelector(".icons").classList.value.split(",") icons[0] = icons[0].replace("icons ",""); document.querySelectorAll(".iconMenu a").forEach((e,i)=>{ e.className = icons[i]; e.title = e.innerText; e.innerText="" }) hover(); delayClose();
  3. This is awesome. Thank you so much for the help!
  4. @Jose Leviaguirre Yes! This is exactly it, thank you so much! Is there a way I can change the look of the icon, or sub that icon out for a different one?
  5. I'm not needing to send any PDFs/other attachments, I just need to see if there's any type of script that exists for clicking a simple button/icon and it generates an Outlook email that they can fill out and send on their own. This email would be sent to myself and would have a pre-created subject, and part of the body saying something like: "Hi, I have a question about this Spotfire guide:"
  6. @David Boot-Olazabal Thank you for the reply! I can do javascript or IronPython. I have ability to choose the 2.0 and 2.7 versions on my system.
  7. Hello, Curious to know if there is a basic javascript that can be imported to accommodate for 2 things- icons and emailing ability. I saw a tutorial for basic scripting for creating a fold out panel (tutorial page is attached), but I was most interested in the ability to add icons and click an icon to generate an Outlook email with a pre-completed destination, subject, and body message. The red highlighted box shows the icon and when this button is clicked, it creates a half-created email. I could have copied the existing javascript that was in the DXP file, but most of it seemed to be accordion/fold out panel related and I only would like to know how to import cool clickable icons and the ability to create an email. On a side note- is there any great places or suggestions for beginners to find javascript/IronPython material to learn how to do these things? Thank you!
  8. Thank you so much Niko, I was able to get it to work!
  9. @Niko Maresco Thank you for the helpful step-by-step! I have 2 questions.... first one- this visual is actually a scatterplot, so I substituted all the "Bar Charts" w/"Scatter plot". Unfortunately this didn't work, but maybe I'm not naming the scatter plot function correctly. Second question- I noticed your version of IronPython was 3.4, and I only have options for 2.0 and 2.7. Is this causing any issues?
  10. Good morning, Does anyone know of a way that I can add a checkbox to a Text Area to make it an option for users to reverse the Y-Axis scale without having to open the Properties of the visual? Thanks!
  11. @Glenn Hoskins would you by chance have any insight to the coloring feature? I'm now having issues with the coloring in the mod. Can't get coloring to show.
  12. Thanks for the reply! I'm not the most savvy with Python or IronPython, but I can work with this and give it a try. I might have the same problem as you with GPT- it's not free to use so this might backfire on me completely. I tried to open your dxp file and for some reason received an error when trying to open it.
  13. Hi @Niko Maresco , Thanks for the reply! Yes, I am only looking for a summarized version of some commentary fields. I have a column meant for comments (free text) and I also have the day broken down in hours/couple hour intervals and I'd like to summarize all the activity comments for all hour rows in a day. Not trying to concatenate, but just a summary.
  14. Does anyone know if there is currently an option/ability in Spotfire for a Mod or some script that could summarize 1 column with multiple rows? I have a data table that consists of daily activity and I'd like to summarize all the "Comments" column for a specific day into a paragraph, if it's possible. Thank you for the help!
  15. I've been trying to troubleshoot why only half of my data responds to the wellbore diagram and still can't figure out what is causing the issue. Here's my console log, hoping it will point to a solution.
×
×
  • Create New...