Skip to content

Instantly share code, notes, and snippets.

@richardDobron
Created July 13, 2022 16:45
Show Gist options
  • Select an option

  • Save richardDobron/4063e0401cece30ca96e54958951e467 to your computer and use it in GitHub Desktop.

Select an option

Save richardDobron/4063e0401cece30ca96e54958951e467 to your computer and use it in GitHub Desktop.
<?php
$asyncResponse = new \dobron\BigPipe\AsyncResponse();
$asyncResponse->bigPipe()->require("require('Chart').setup()", [
'element' => \dobron\BigPipe\TransportMarker::transportElement('chart-div'),
'dataPoints' => $asyncResponse->transport()->transportSet([
['x' => 10, 'y' => 71],
['x' => 20, 'y' => 55],
['x' => 30, 'y' => 50],
['x' => 40, 'y' => 65],
]),
]);
$asyncResponse->send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment