Forum Discussion

FICO's avatar
FICO
Community Manager
6 years ago

VDL-chart-series line thickness

How do you change the line thickness of a vdl-chart-series?

1 Reply

  • FICO's avatar
    FICO
    Community Manager

    Hi Aiex, I answered this same question from a colleague of yours earlier today but will post the example here in case anyone else needs it.

    Here is an example that shows how to modify the settings for the second series in a chart:

    <vdl version="4.7">

       <vdl-page>

           <script>

               function chartModifier(config) {

                   var series2 = config.data[1];

                   series2.line = {

                       dash: 'dashdot',

                       color: 'red',

                       width: 5

                   };

                   return config;

               }

           </script>

           <vdl-section heading="Quick Chart">

               <vdl-row>

                   <vdl-column size="12">

                       <vdl-chart modifier="=chartModifier">

                           <vdl-chart-series entity="Input"></vdl-chart-series>

                           <vdl-chart-series entity="Result" type="line"></vdl-chart-series>

                       </vdl-chart>

                   </vdl-column>

               </vdl-row>

           </vdl-section>

       </vdl-page>

    </vdl>

    Best regards,

    Joc O'Connor