javascript - Highcharts - Render new chart when text area equals a certain value -


it's bit of odd question need find out.

i have 2 charts can see here rather them both being rendered @ same time spline chart render when have drilled down in tree map chart.

when tree map drilled down can see value of text area changes name of node:

screenshot

my idea - example purposes - when value of text box equals 'bill' spline chart render.

so far have tried following javascript:

    if (thepointname == 'bill') {     highcharts.chart('container2', {     chart: {         type: 'spline'     },     title: {         text: 'monthly average temperature'     },     subtitle: {         text: 'source: worldclimate.com'     },     xaxis: {         categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun',             'jul', 'aug', 'sep', 'oct', 'nov', 'dec']     },     yaxis: {         title: {             text: 'temperature'         },         labels: {             formatter: function () {                 return this.value + '°';             }         }     },     tooltip: {         crosshairs: true,         shared: true     },     plotoptions: {         spline: {             marker: {                 radius: 4,                 linecolor: '#666666',                 linewidth: 1             }         }     },     series: [{         name: 'tokyo',         marker: {             symbol: 'square'         },         data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, {             y: 26.5,             marker: {                 symbol: 'url(https://www.highcharts.com/samples/graphics/sun.png)'             }         }, 23.3, 18.3, 13.9, 9.6]      }, {         name: 'london',         marker: {             symbol: 'diamond'         },         data: [{             y: 3.9,             marker: {                 symbol: 'url(https://www.highcharts.com/samples/graphics/snow.png)'             }         }, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]     }] });     } 

but fails render chart. if has suggestions appreciate them.

a final point add question using meteor - incase makes difference i'm not sure does.

many thanks, g


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -