Home Forums Chart Support PHP to Create array for Datapoints

PHP to Create array for Datapoints

Viewing 2 posts - 1 through 2 (of 2 total)
  • #31936

    I am working with a poorly defined XML file that will be updated each week. We want to update the content of the chart by adding the new XML file to the same location and pulling in the information which will be essentially the same each week with the exception of the last group of numbers. Although a large portion of the file is numbers the last section is all the information we will need each week and it look like this :

    I have gotten into this data and can loop trhough the now 34 weeks of this data and access the information I need in PHP, but adding this content into the existing example of the array that has been provided by Canvas has not worked.

    I tried to loop through and build the datapoint array and it did not work.

    code so far:

    I know some of the variables are not pretty but they are working. When i tried to loop through adding this content into the array it would only show the last weeks numbers, so it is pulling the data, but not looping through the updates.

    the echo lines are just tests to make sure data is updating correctly and it is, any help to get into the arrays would be much appreciated. I contacted the support team but have not heard back yet. If you need a bit more examples of my code I can provide, this is the trouble area, the code above this driving this content is working correctly.




    Can you kindly share sample project along with sample xml file over Google-Drive or Onedrive so that we can look into the code, run it locally to understand the use-case better and help you out?

    From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue or not able to understand the exact requirements or the solution that we provide may not work properly due to the variation in your sample data / chart-options being used by you and us.

    Having a sample project helps us in figuring out the scenario better and help you out accordingly.

    Manoj Mohan
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.