Ziv-Barber / officegen

Standalone Office Open XML files (Microsoft Office 2007 and later) generator for Word (docx), PowerPoint (pptx) and Excell (xlsx) in javascript. The output is a stream.
MIT License
2.65k stars 471 forks source link

charts messed up on google slides and mac #350

Open HeshamAbdElLatif opened 4 years ago

HeshamAbdElLatif commented 4 years ago

charts messed up on google slides and mac, it works fine on windows.

https://docs.google.com/presentation/d/1So7t0_fq7SuaccqacLXCXY_19a9qUf2PSmGuyc-SECE/edit?usp=sharing

and here is example of the code

if(folllowerOverTime.length>0){
        let slide_5 = pptx.makeNewSlide()
        SlideTitle(slide_5, _Translate('Followers growth', 'نمو المتابعون'), 8, 6.7)
        const followers_over_time_labels = folllowerOverTime.map(tweet => tweet.name)
          const followers_over_time_values = folllowerOverTime.map(tweet => tweet.value)

          // Volume Over Time - Bars chart
          slide_5.addChart(
            {
              title: ' ',
              renderType: 'column',
              data: [
                {
                  name: _Translate('Followers', 'المتابعون'),
                  labels: followers_over_time_labels,
                  values: followers_over_time_values,

                  color: ['27AAE1']
                }
              ]
            },
            finalize
          )
        }