当前位置: 首页>>代码示例>>PHP>>正文


PHP Highchart::getScripts方法代码示例

本文整理汇总了PHP中Highchart::getScripts方法的典型用法代码示例。如果您正苦于以下问题:PHP Highchart::getScripts方法的具体用法?PHP Highchart::getScripts怎么用?PHP Highchart::getScripts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Highchart的用法示例。


在下文中一共展示了Highchart::getScripts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderChart

/**
 * renderChart
 *
 * display simple text on the web page
 *
 * @param 	Highchart 	$chart 			number of spaces
 * 			int			$id_chart		id of the chart in the div to display the content and render it
 * @return 	nothing						nothing
 */
function renderChart($chart, $id_chart)
{
    foreach ($chart->getScripts() as $script) {
        echo '<script type="text/javascript" src="' . $script . '"></script>';
    }
    echo '<script type="text/javascript">' . $chart->render($id_chart) . '</script>';
}
开发者ID:rafaelurrutia,项目名称:bmonitor-y-bi,代码行数:16,代码来源:api.php

示例2: Highchart

include_once "../../../Highchart.php";
$chart = new Highchart();
$chart->chart->renderTo = "container";
$chart->title->text = "Logarithmic axis demo";
$chart->xAxis->tickInterval = 1;
$chart->yAxis->type = "logarithmic";
$chart->yAxis->minorTickInterval = 0.1;
$chart->tooltip->headerFormat = "<b>{series.name}</b><br />";
$chart->tooltip->pointFormat = "x = {point.x}, y = {point.y}";
$chart->series[] = array('data' => array(1, 2, 4, 8, 16, 32, 64, 128, 256, 512), 'pointStart' => 1);
?>

<html>
  <head>
    <title>Logarithmic axis</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <?php 
foreach ($chart->getScripts() as $script) {
    echo '<script type="text/javascript" src="' . $script . '"></script>';
}
?>
  </head>
  <body>
    <div id="container"></div>
    <script type="text/javascript">
    <?php 
echo $chart->render("chart1");
?>
    </script>
  </body>
</html>
开发者ID:google-code-backups,项目名称:simplerisk,代码行数:31,代码来源:logarithmic_axis.php

示例3: HighchartJsExpr

$chart->tooltip->formatter = new HighchartJsExpr("function() {\n    var point = this.points[0];\n    return '<b>'+ point.series.name +'</b><br/>'+\n    Highcharts.dateFormat('%A %B %e %Y', this.x) + ':<br/>'+\n    '1 USD = '+ Highcharts.numberFormat(point.y, 2) +' EUR'; }");
$detailChart->tooltip->shared = 1;
$detailChart->legend->enabled = false;
$detailChart->plotOptions->series->marker->enabled = false;
$detailChart->plotOptions->series->marker->states->hover->enabled = 1;
$detailChart->plotOptions->series->marker->states->hover->radius = 3;
$detailChart->series[] = array('name' => "USD to EUR", 'pointStart' => new HighchartJsExpr("detailStart"), 'pointInterval' => 24 * 3600 * 1000, 'data' => new HighchartJsExpr("detailData"));
$detailChart->exporting->enabled = false;
?>

<html>
  <head>
    <title>Master detail chart</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <?php 
foreach ($masterChart->getScripts() as $script) {
    echo '<script type="text/javascript" src="' . $script . '"></script>';
}
?>
  </head>
  <body>
    <div id="container"></div>
    <script type="text/javascript">
        var data = [
            0.8446, 0.8445, 0.8444, 0.8451, 0.8418, 0.8264, 0.8258, 0.8232, 0.8233, 0.8258,
            0.8283, 0.8278, 0.8256, 0.8292, 0.8239, 0.8239, 0.8245, 0.8265, 0.8261, 0.8269,
            0.8273, 0.8244, 0.8244, 0.8172, 0.8139, 0.8146, 0.8164, 0.82, 0.8269, 0.8269,
            0.8269, 0.8258, 0.8247, 0.8286, 0.8289, 0.8316, 0.832, 0.8333,  0.8352, 0.8357,
            0.8355, 0.8354, 0.8403, 0.8403, 0.8406, 0.8403, 0.8396, 0.8418, 0.8409, 0.8384,
            0.8386, 0.8372, 0.839, 0.84, 0.8389, 0.84, 0.8423, 0.8423, 0.8435, 0.8422,
            0.838, 0.8373, 0.8316, 0.8303,  0.8303, 0.8302, 0.8369, 0.84, 0.8385, 0.84,
开发者ID:google-code-backups,项目名称:simplerisk,代码行数:31,代码来源:master_detail_chart.php


注:本文中的Highchart::getScripts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。