public function testRenderOptionsEncoding() { //Check for encoding problems $chart = new Highchart(); $chart->test->utf8String = "áù anything ü"; $chart->test->iso88591 = iconv("UTF-8", "ISO-8859-1", "áù anything ü"); $result = $chart->renderOptions(); $this->assertEquals('{"test":{"utf8String":"\\u00e1\\u00f9 anything \\u00fc","iso88591":"\\u00e1\\u00f9 anything \\u00fc"}}', $result); }
name: this.innerHTML, data: [] }; } else { // add values options.series[j - 1].data.push(parseFloat(this.innerHTML)); } } }); }); var chart = new Highcharts.Chart(options); } var table = document.getElementById('datatable'), options = <?php echo $chart->renderOptions(); ?> ; Highcharts.visualize(table, options); }); </script> <table id="datatable"> <thead> <tr> <th></th> <th>Jane</th> <th>John</th> </tr> </thead> <tbody> <tr>
<html> <head> <title>Donut chart</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php $chart->printScripts(); ?> </head> <body> <div id="container"></div> <script type="text/javascript"> var colors = Highcharts.getOptions().colors, categories = ['MSIE', 'Firefox', 'Chrome', 'Safari', 'Opera'], name = 'Browser brands', data = <?php echo $chartData->renderOptions(); ?> ; // Build the data arrays var browserData = []; var versionsData = []; for (var i = 0; i < data.length; i++) { // add browser data browserData.push({ name: categories[i], y: data[i].y, color: data[i].color });