PHPPresentation
PHPPresentation copied to clipboard
How to create phppresentation chart with multiple lines ?
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 Could you show me a sample code for testing in local ? Thanks.
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