Skip to content

How can I add axes labels (titles)?

Dmitry Voytsekhovskiy edited this page Apr 21, 2016 · 1 revision

For example you want to add "X" and "Y" axes

Add additional divs into chart div. Set "idd-horizontalTitle" or "idd-verticalTitle" as a class to choose title direction and set data-idd-placement attribute as "left", "right", "top" or "bottom" to choose axis arrangement

Example:

<div id="chart" data-idd-plot="chart" style="width: 100%; height: 480px;"> 
     <div data-idd-placement="bottom" class="idd-horizontalTitle">X</div> 
          <div data-idd-placement="left" class="idd-verticalTitle" style="width: 20px"> 
               <div style="position: absolute; top: 50%; margin-top: -0.5em; height: 10em; width: 100px;"> 
                   Y 
               </div> 
          </div> 
      </div> 
</div>
Clone this wiki locally