@@ -175,6 +175,8 @@ function createChart(data, ctxId) {
175175 charts [ ctxId ] . destroy ( ) ;
176176 }
177177
178+ document . getElementById ( 'charts-wrapper' ) . style . width = ( data . length * 100 + 200 ) + 'px' ;
179+
178180 const firstDate = new Date ( data [ 0 ] . start ) ;
179181 const lastDate = new Date ( data [ data . length - 1 ] . end ) ;
180182
@@ -192,12 +194,12 @@ function createChart(data, ctxId) {
192194
193195 const departmentColors = { } ;
194196 const colorPalette = [
195- '#FF6633' , '#FFB399' , '#FF33FF' , '#FFFF99 ' , '#00B3E6 ' ,
196- '#E6B333 ' , '#3366E6 ' , '#999966 ' , '#99FF99 ' , '#B34D4D ' ,
197- '#80B300 ' , '#809900 ' , '#E6B3B3 ' , '#6680B3 ' , '#66991A ' ,
198- '#FF99E6 ' , '#CCFF1A ' , '#FF1A66 ' , '#E6331A ' , '#33FFCC ' ,
199- '#66994D ' , '#B366CC ' , '#4D8000 ' , '#B33300 ' , '#CC80CC ' ,
200- '#66664D' , '#991AFF' , '#E666FF' , '# 4DB3FF', '#1AB399' ,
197+ '#FF6633' , '#FFB399' , '#FF33FF' , '#00B3E6 ' , '#3366E6 ' ,
198+ '#999966 ' , '#99FF99 ' , '#B34D4D ' , '#80B300 ' , '#E6B3B3 ' ,
199+ '#6680B3 ' , '#66991A ' , '#FF99E6 ' , '#CCFF1A ' , '#FF1A66 ' ,
200+ '#E6331A ' , '#33FFCC ' , '#66994D ' , '#B366CC ' , '#4D8000 ' ,
201+ '#B33300 ' , '#CC80CC ' , '#66664D ' , '#991AFF ' , '#E666FF ' ,
202+ '#4DB3FF' , '#1AB399' ,
201203 ] ;
202204
203205 departments . forEach ( ( dept , index ) => {
@@ -282,13 +284,15 @@ function createChart(data, ctxId) {
282284 }
283285 } , ChartDataLabels ] ,
284286 options : {
287+ responsive : true ,
288+ maintainAspectRatio : false ,
285289 interaction : {
286290 mode : 'index'
287291 } ,
288292 layout : {
289- padding : {
290- bottom : 80
291- }
293+ // padding: {
294+ // bottom: 80
295+ // }
292296 } ,
293297 plugins : {
294298 datalabels : {
@@ -301,7 +305,7 @@ function createChart(data, ctxId) {
301305 }
302306 } ,
303307 title : {
304- display : true ,
308+ display : false ,
305309 text : `RC Workshops ${ dateToSemester ( firstDate ) } –${ dateToSemester ( lastDate ) } ` ,
306310 font : {
307311 size : 25
@@ -343,8 +347,8 @@ function createChart(data, ctxId) {
343347 stacked : true ,
344348 ticks : {
345349 autoSkip : false ,
346- maxRotation : 90 ,
347- minRotation : 60 ,
350+ // maxRotation: 90,
351+ // minRotation: 60,
348352 }
349353 } ,
350354 y : {
0 commit comments