Highcharts in Symfony 2.8

0

I have been trying for some time to use this Highcharts library in a personal project that I am developing in Symfony 2.8 . I have searched the bibliography and when trying to follow the steps for the installation of the OBHighchartsBundle bundle I get the following error:

C:\xampp\htdocs\Symfony 2.8>composer require ob/highcharts-bundle
Using version ^1.6 for ob/highcharts-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove twig/twig v1.23.1
    - Conclusion: don't install twig/twig v2.4.8
    - Installation request for ob/highcharts-bundle ^1.6 -> satisfiable by ob/highcharts-bundle[1.6].
    - Conclusion: don't install twig/twig v1.23.1
    - ob/highcharts-bundle 1.6 requires twig/twig ^1.35 || ^2.4 -> satisfiable by twig/twig[v1.35.0, v1.35.1, v1.35.2, v1.35.3, v2.4.0, v2.4.1, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8].
    - Can only install one of: twig/twig[v1.35.0, v1.23.1].
    - Can only install one of: twig/twig[v1.35.1, v1.23.1].
    - Can only install one of: twig/twig[v1.35.2, v1.23.1].
    - Can only install one of: twig/twig[v1.35.3, v1.23.1].
    - Can only install one of: twig/twig[v2.4.0, v1.23.1].
    - Can only install one of: twig/twig[v2.4.1, v1.23.1].
    - Can only install one of: twig/twig[v2.4.2, v1.23.1].
    - Can only install one of: twig/twig[v2.4.3, v1.23.1].
    - Can only install one of: twig/twig[v2.4.4, v1.23.1].
    - Can only install one of: twig/twig[v2.4.5, v1.23.1].
    - Can only install one of: twig/twig[v2.4.6, v1.23.1].
    - Can only install one of: twig/twig[v2.4.7, v1.23.1].
    - Installation request for twig/twig (locked at v1.23.1) -> satisfiable by twig/twig[v1.23.1].


Installation failed, reverting ./composer.json to its original content.  

For what you can see is a problem with the twig version.
 My question is how can I correct this error that the console shows me.

Another thing I've tried is to import the file highcharts.js and do this:
HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 300px"></div>  

JS

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Fruit Consumption'
        },
        xAxis: {
            categories: ['Apples', 'Bananas', 'Oranges']
        },
        yAxis: {
            title: {
                text: 'Fruit eaten'
            }
        },
        series: [{
            name: 'Jane',
            data: [1, 0, 4]
        }, {
            name: 'John',
            data: [5, 7, 3]
        }],
    });
});  

But in the same way I do not get any results ...

    
asked by warner 23.05.2018 в 21:59
source

0 answers