2017 © Pedro Peláez
 

project flowchart-to-png

Convert from flowchart json encoded to png

image

fidelize/flowchart-to-png

Convert from flowchart json encoded to png

  • Friday, September 22, 2017
  • by alanwillms
  • Repository
  • 11 Watchers
  • 1 Stars
  • 253 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 6 Versions
  • 16 % Grown

The README.md

flowchart-to-png

Setup

Add the library to your composer.json file in your project:, (*1)

{
  "require": {
      "fidelize/flowchart-to-png": "1.0.0"
  }
}

Use composer to install the library:, (*2)

$ php composer.phar install

Composer will install flowchart-to-png inside your vendor folder. Then you can add the following to your .php files to use the library with Autoloading., (*3)

require_once(__DIR__ . '/vendor/autoload.php');

Usage

$json = '{
  "nodes": [
    {
      "id": "flowchartStart",
      "type": "start",
      "text": "Start",
      "left": "20px",
      "top": "180px",
      "countSource": null
    },
    {
      "id": "flowchartEnd",
      "type": "end",
      "text": "End",
      "left": "940px",
      "top": "180px",
      "countSource": null
    },
    {
      "id": "flowchartWindow1489779664638",
      "type": "action",
      "text": "Approve",
      "left": "680px",
      "top": "260px",
      "action": "Approve",
      "extraParams": "",
      "countSource": "1"
    },
    {
      "id": "flowchartWindow1489779672763",
      "type": "action",
      "text": "Reject",
      "left": "620px",
      "top": "40px",
      "action": "Reject",
      "extraParams": "",
      "countSource": "1"
    }
  ],
  "edges": [
    {
      "source": "flowchartStart",
      "target": "flowchartWindow1489779664638",
      "data": {
        "label": "",
        "positionSource": "RightMiddle",
        "positionTarget": "LeftMiddle"
      }
    },
    {
      "source": "flowchartStart",
      "target": "flowchartWindow1489779672763",
      "data": {
        "label": "",
        "positionSource": "RightMiddle",
        "positionTarget": "LeftMiddle"
      }
    },
    {
      "source": "flowchartWindow1489779672763",
      "target": "flowchartEnd",
      "data": {
        "label": "Success",
        "return": "success",
        "positionSource": "RightMiddle",
        "positionTarget": "LeftMiddle"
      }
    },
    {
      "source": "flowchartWindow1489779664638",
      "target": "flowchartEnd",
      "data": {
        "label": "Success",
        "return": "success",
        "positionSource": "RightMiddle",
        "positionTarget": "LeftMiddle"
      }
    }
  ]
}';


$flowChartImage = new FlowChartImage();
$flowChartImage->setContent($json);
$flowChartImage->generate()->toPng($path);

Change Node Color

```php, (*4)

$image->setSelectedAction('flowchartWindow1489779664638'); $image->setSelectedColor([255, 0, 0]);, (*5)

The Versions

22/09 2017

dev-master

9999999-dev

Convert from flowchart json encoded to png

  Sources   Download

The Requires

  • php >=5.6

 

The Development Requires

php png flowchart fidelize

22/09 2017

1.0.2

1.0.2.0

Convert from flowchart json encoded to png

  Sources   Download

The Requires

  • php >=5.6

 

The Development Requires

php png flowchart fidelize

17/04 2017

1.1.0

1.1.0.0

Convert from flowchart json encoded to png

  Sources   Download

The Requires

  • php >=5.6

 

The Development Requires

php png flowchart fidelize

05/04 2017

dev-to-base64

dev-to-base64

Convert from flowchart json encoded to png

  Sources   Download

The Requires

  • php >=5.6

 

php png flowchart fidelize

29/03 2017

1.0.1

1.0.1.0

Convert from flowchart json encoded to png

  Sources   Download

The Requires

  • php >=5.6

 

php png flowchart fidelize

29/03 2017

1.0.0

1.0.0.0

Convert from flowchart json encoded to png

  Sources   Download

The Requires

  • php >=5.6

 

php png flowchart fidelize