PHPPresentation icon indicating copy to clipboard operation
PHPPresentation copied to clipboard

How to create phppresentation chart with multiple lines ?

Open youssefboudaya opened this issue 7 years ago • 2 comments

I have multiple data for each year so i want to create multiple lines in my chart the y axis values are the same but the x axis are different how should i make my series or line to have this result ?

Example of the data that i have :

  `[
    {
       year: "2018-10-18",
       likes_paid: 0,
       likes_unpaid: 5,
      net likes: 1,
      unlikes: -4
    },
    {
     year: "2018-10-19",
     likes_paid: 0,
     likes_unpaid: 5,
     net likes: 0,
     unlikes: -5
   }
  ]`

I tried to make a serie like this : { 2018-10-18: "0,5,1,-4", 2018-10-19: "0,5,0,-5" } but i get the repair error from powerpoint !!

youssefboudaya avatar Nov 14 '18 14:11 youssefboudaya

@youssefboudaya Could you show me a sample code for testing in local ? Thanks.

Progi1984 avatar Nov 28 '18 11:11 Progi1984

You should add several series (4) to your $lineChart $serie1Data = ["2018-10-18"=>0,2018-10-19=>0] $lineChart->addSeries($series1Data); $series2Data = ["2018-10-18"=>5,2018-10-19=>5]; $lineChart->addSeries($series2Data); and so on

bamatic avatar Mar 18 '21 07:03 bamatic