javascript - Draw a chart after location.assign() -
i want draw chart (with library highchart.js ) after window.location.assign(). problem chart drew before location.assign() can't see it.i see blank page! how can resolve problem?i post code:
window.location.assign("http://localhost:8009/web#grafici"); $('#mychart').highcharts({ xaxis: { categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { type: 'line', color: 'red', marker: { enabled: false }, data: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100] }] });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script> <div data-role="page" id="grafici"> <div data-theme="" data-role="header"> <h3>statistiche esame</h3> </div> <div id="mychart" style="height: 400px"></div> </div>
Comments
Post a Comment