Change font size grid in gantt



Good afternoon

Change font size grid in gantt


How and how to decrease the grid font for the gantt chart.
I didn't find documentation.
I tried to use a css in the div but it didn't change anything.

Thanks

3 Replies 1 reply marked as answer

PP Pooja Priya Krishna Moorthy Syncfusion Team July 17, 2020 02:39 PM UTC

Hi Carmem, 
In Gantt, we define different font styles for different elements. We changed the font-size of entire Gantt by setting the font-size for following class names. 
  1. .e-grid .e-headercelldiv,
  2. .e-grid .e-rowcell,
  3. .e-gantt .e-gantt-chart .e-timeline-top-header-cell,
  4. .e-gantt .e-gantt-chart .e-label,
  5. .e-toolbar .e-tbar-btn .e-tbar-btn-text

Please find the below code example. 
<style> 
    .e-grid .e-headercelldiv, 
    .e-grid .e-rowcell, 
    .e-gantt .e-gantt-chart .e-timeline-top-header-cell, 
   .e-gantt .e-gantt-chart .e-label, 
    .e-toolbar .e-tbar-btn .e-tbar-btn-text { 
        font-size: 10px; 
    } 
</style> 


Regards, 
Pooja K. 



CA CARMEM July 17, 2020 06:27 PM UTC

Good afternoon

I copied exactly your code but it didn't work. The fountain is still large. Maybe for the version, I'm in javascript 1. I'll try to find the file and the correct property in the css and change it right there.


 thanks


GM Gopinath Muniraj Syncfusion Team July 20, 2020 12:05 PM UTC

Hi Carmem, 
As you are using Javascript 1, the class names will be different from ej1 to ej2.  Hence, we have changed the font-size of entire Gantt by the following class names, 
  1. .e-treegrid-core
  2. .e-ganttchart .e-taskbarname
  3. .e-ganttchart .e-resourceinfo
  4. .e-ganttchart .e-tasklabel
  5. .e-headercelldiv
  6. .e-ganttchart .e-gantt-schedule-container
Please find the below code example, 
 
<style id='customStyle'> 
      .e-treegrid-core, .e-ganttchart .e-taskbarname, 
      .e-ganttchart .e-resourceinfo, .e-ganttchart .e-tasklabel, 
        .e-headercelldiv, .e-ganttchart .e-gantt-schedule-container  
       { 
             font-size:10px !important; 
      }                   
</style> 
 
 
Thanks, 
Gopinath M 


Marked as answer
Loader.
Up arrow icon