asp.net - 3D Column chart not working with sliders in asp .net project -
i got errors while executing code. , dont know reason. iam trying implement 3d column chart in project in asp .net .i got chart while adjusting angles of 3d , ie alpha angle , beta angle chart nit redraing. please check code , me.please. code :
$( document ).ready(function() {
//3d column chart var somefunction3dcolumn=function () { $('#container').highcharts({ chart: { renderto: 'container', type: 'column', margin: 75, options3d: { enabled: true, alpha: 15, beta: 15, depth: 50, viewdistance: 25 } }, title: { text: <%= yeardatabar%> }, subtitle: { text: '' }, xaxis: { labels: { rotation: -45, style: { fontsize: '13px', fontfamily: 'verdana, sans-serif' } }, categories: [ 'jan', 'feb', 'march', 'april', 'may', 'june', 'july' ] }, plotoptions: { column: { depth: 25 } }, series: [{ data:<%= field1%> }] }); function showvalues() { alert("main"); //$('#sliders').show(); $('#r0-value').html(chart.options.chart.options3d.alpha); $('#r1-value').html(chart.options.chart.options3d.beta); } // activate sliders $('#r0').on('change', function () { alert("alpha"); chart.options.chart.options3d.alpha = this.value; alert(alpha); showvalues(); chart.redraw(false); }); $('#r1').on('change', function () { alert("beta"); chart.options.chart.options3d.beta = this.value; alert(beta); showvalues(); chart.redraw(false); }); showvalues(); }; if ($("#radiobutton1").is(":checked")) {$('#sliders').hide(); somefunctionpie(); } if ($("#radiobutton2").is(":checked")) {$('#sliders').hide(); somefunctionbar(); } if ($("#radiobutton3").is(":checked")) {$('#sliders').hide(); somefunctionpyramid(); } if ($("#radiobutton4").is(":checked")) { somefunction3dcolumn(); } }); <div id="sliders"> <table> <tr><td>alpha angle</td><td><input id="r0" type="range" min="0" max="45" value="15"/> <span id="r0-value" class="value"></span></td></tr> <tr><td>beta angle</td><td><input id="r1" type="range" min="0" max="45" value="15"/> <span id="r1-value" class="value"></span></td></tr> </table> </div>
i think trying recreate this demo. problem chart
variable. in above demo, different constructor used:
var chart = new highcharts.chart({ ... });
while using:
$('#container').highcharts({ ... });
first 1 creating chart , returning variable. second 1 creating chart inside element using jquery. change that, have variable chart
, , able set new options chart.options.chart.options3d.beta = this.value;
. anyway, i'm pretty sure have errors in js console..
Comments
Post a Comment