.. role:: ts-api-decorator

##############
ScalarSettings
##############

.. js:module:: cee.usg
   :noindex:

.. container:: ts-api-section

   .. js:class:: ScalarSettings

      Setting for how a scalar should be shown in the model.

      You can get the settings for the scalar shown as fringes (filled contours) with the 
      ``UnstructGridModel.fringesSettings`` property.

      Example using the ScalarMapperFilledContoursUniform:

      .. code-block:: javascript

         // Configure the mapper to use, and 
         const mapper = new cee.ScalarMapperFilledContoursUniform();
         mapper.colorArray = cee.ColorTableFactory.color4TableArray(cee.ColorTable.RAINBOW, 15);
         mapper.setRange(1,4);
         model.fringesSettings.scalarMapper = mapper;

         // Add a color legend based on the mapper
         this.m_view.overlay.addCustomColorLegendForScalarMapper(mapper, "Demo result", 1);




.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~cee.usg.ScalarSettings.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

   .. rst-class:: api-index-list-item api-kind-accessor api-parent-kind-class

   * :js:attr:`~cee.usg.ScalarSettings.name`
   * :js:attr:`~cee.usg.ScalarSettings.scalarMapper`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: ScalarSettings.constructor()



      :rtype: ScalarSettings



Accessors
=========

.. container:: ts-api-section

   .. js:function:: ScalarSettings.name()



      The name of the scalar result


      :rtype: string

   .. js:function:: ScalarSettings.name( name)

      :param name: None
      :type name: string


      :rtype: void



.. container:: ts-api-section

   .. js:function:: ScalarSettings.scalarMapper()



      The scalar mapper to use to map from a scalar value to a color

      EnvisionWeb offers 4 different scalar mappers:

      - ``cee.ScalarMapperFilledContours``
      - ``cee.ScalarMapperFilledContoursUniform``
      - ``cee.ScalarMapperContinuous``
      - ``cee.ScalarMapperContinuousPiecewise``

      To add a color legend to a view to show the scalar mapper, use the ``cee.Overlay.addCustomColorLegendForScalarMapper``
      method (see example above).


      :rtype: ScalarMapperContinuousDomain

   .. js:function:: ScalarSettings.scalarMapper( scalarMapper)

      :param scalarMapper: None
      :type scalarMapper: ScalarMapperContinuousDomain


      :rtype: void



