6 Replies Latest reply on May 3, 2018 1:27 AM by asorokina

    Custom symbol setting "noExpandSelector"

    Roger Palmen

      I found this in the extensibility documentation:

      noExpandSelectorString. CSS class name for
      determines if a popup
      trend does not show.

       

       

      This hints at a way to disable the "double-click to show a trend" function, but the documentation is incomprehensible. Anybody around who can explain?

        • Re: Custom symbol setting "noExpandSelector"
          asorokina

          Hi Roger,

           

          After looking into source code, it appears that the way this works is that when user double-clicks on a symbol, PI Vision attempts to find the closest ancestor HTML element to the one user clicked on that satisfies criteria set in the noExpandSelector property. If it finds any, then the ad-hoc trend won't show up.

           

          So, wrap your symbol html code in a div and set its class to, for example, "youshallnotpass". Then set the noExpandSelector property to ".youshallnotpass".

           

          ...-template.html

          <div class="youshallnotpass">
              <div>Symbol body</div>
          </div>
          
          

           

          .js

          var definition = {
              typeName: 'symbolname',
              visObjectType: symbolVis,
              datasourceBehavior: PV.Extensibility.Enums.DatasourceBehaviors.Single,
              noExpandSelector: '.youshallnotpass',
              getDefaultConfig: function(){
                 return {
                    DataShape: 'Value',
                    Height: 150,
                    Width: 150,
                 }
          }
          
          
          
          1 of 1 people found this helpful