Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #257588

    hi!
    I do use the insert-html-snippet plugin as mentioned here in this forum to generate javascript charts. It works well on “static” elements, but the same snippet used in the content slider doesn’t generate the graph.

    I appreciate your help! many thx. fri_z

    ————————-

    Snippet code

    <div id="containerix01" style="min-width: 310px; height: 200px; margin: 0 auto"></div>
    <script language="JavaScript" src="http://code.highcharts.com/highcharts.js"></script>
    <script language="JavaScript" type="text/javascript">
    var chart = new Highcharts.Chart({
        chart: {  renderTo: 'containerix01'  },
        xAxis: {  type: 'datetime'  },
        series: [{         data: [0, 25, 0, 25, 0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
            pointStart: Date.UTC(2012, 0, 1),        pointInterval: 24 * 3600 * 1000,  }]
    }); 
    </script>

    Code in Slider Element
    [xyz-ihs snippet="img1"]

    * plugin “Use Google Libraries” is required as well

    #258448

    Hey fri_z!

    I’m not sure there is anything that we can do with that. Using the plugin is a workaround for trying to insert in content that isn’t meant for a content area.

    If we can see the site and section live we can try inspecting the implementation but it may be something that is best handled with a custom shortcode or small plugin to make the scripts pulled in correctly.

    Best regards,
    Devin

    #258471

    may I send u the login credentials per mail, address?

    #258582

    Hey!

    We just need the site URL, post it here as a private reply (only you and mods will see it).

    Best regards,
    Josue

    #258762
    This reply has been marked as private.
    #259025

    Hey!

    I don’t see any content slider in that page, no JavaScript errors either.

    Regards,
    Josue

    #259026
    This reply has been marked as private.
    #259215

    Hey!

    The error (Uncaught Highcharts error #16) is happening because Highcharts already defined in the page, you’d need to refactor your code:
    http://stackoverflow.com/questions/17364172/highcharts-error-16-charts-not-showing-on-the-same-page

    Regards,
    Josue

    #259297

    You’re right! I didn’t take care because it worked for two charts, but it obviously does not for another one.
    Charts are now OK, no javascript error at all. Still there’s an issue that the rendering of the charts in the slider doesn’t work properly… Guess this is something I need to check out with HighCharts.
    Many thanks for your help!

    #259518

    You are welcome, glad we could help :)

    Regards,
    Josue

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Content slider with html/javascript’ is closed to new replies.