Generuję wykres z pomocą klasy PHPlot.
Chciłbym się dowiedzieć, jak zamienić użycie tablicy array na postać $tablica[xxx]w tym przypadku , ponieważ mam kilkadziesiąt rekordów generowanych dynamicznie i przkazywanych do wykresu i nie mogę wpisywać z ręki na "sztywno"
Oto przyklad:
<? include ( \"phplot.php\"); $graph = new PHPlot; $graph->SetDataType( \"linear-linear\"); // Specify some data ); $graph->SetDataValues($data); //Specify plotting area details $graph->SetImageArea(600,400); //$graph->SetPlotType(\"lines\"); $graph->SetTitleFontSize(\"5\"); //$d = 'znak'; $graph->SetTitle(\"Statystyka Sprzedaży\"); $graph->SetPlotAreaWorld(2000,0,2035,2000); $graph->SetPlotBgColor(\"red\"); $graph->SetPlotBorderType(\"left\"); $graph->SetBackgroundColor(\"white\"); //Define the X axis $graph->SetXLabel(\"Year\"); $graph->SetHorizTickIncrement(\"5\"); //Define the Y axis //$graph->SetVertTickIncrement(\"500\"); $graph->SetPrecisionY(\"0\"); $graph->SetLightGridColor(\"blue\"); $graph->DrawGraph(); ?>