如何在甲骨文顶点插入类似瀑布图的瀑布图? [英] How can i plug an waterfall-chart like waterfall-chart in oracle apex

查看:20
本文介绍了如何在甲骨文顶点插入类似瀑布图的瀑布图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法用甲骨文顶点绘制瀑布图?

我在链接下面找到了类似于我想要的的方法,但它不适用于瀑布图(&P>) https://orclking.blogspot.com/2021/03/single-callback-to-draw-multiple-google.html

推荐答案

我得到了解决方案。 这是在甲骨文中使用Google图表的一个例子。 您可以在plsql区域中编写以下代码。

DECLARE
l_title VARCHAR2(240) := 'Example to Draw any Google Charts in Oracle APEX';
BEGIN 
  htp.p('<html>');
  htp.p('<head>');
  htp.p('<script type="text/javascript" 
  src="https://www.gstatic.com/charts/loader.js"></script>');
  htp.p('<script type="text/javascript">');

  -- Load Charts and the corechart and barchart packages.
  htp.p('google.charts.load(''current'', {''packages'':[''corechart'']})');
  htp.p('google.charts.setOnLoadCallback(drawChart)');

  -- draw chart
  htp.p('function drawChart() { 
        var data2 = google.visualization.arrayToDataTable([
          [''Mon'', 0, 0, 38, 38],
          [''Tue'', 38, 38, 55, 55],
          [''Wed'', 55, 55, 77, 77],
          [''Thu'', 77, 77, 66, 66],
          [''Fri'', 0, 0, 66, 66]
          // Treat the first row as data.
        ], true);');

  htp.p('var waterfall_options = {title:''waterfall: '||l_title||''',
                                 width:500,
                                 height:300,
                                 pieHole: 0.4,
                                 legend: ''none'',
                                 bar: { groupWidth: ''80%'' }, // Remove space between bars.
                                 candlestick: {
                                    fallingColor: { strokeWidth: 0, fill: ''red'' }, 
                                    risingColor: { strokeWidth: 0, fill: ''blue'' } }  
                                    }' );
  htp.p('var waterfall = new google.visualization.CandlestickChart
         (document.getElementById(''CandlestickChartdiv''))');
  
  htp.p('waterfall.draw(data2, waterfall_options)');


  htp.p('}');
  htp.p('</script>');
  htp.p('</head>');
  htp.p('<body>');

  htp.p('<div id="CandlestickChartdiv" style="border: 1px solid #ccc"></div>');
 
  htp.p('</body>');
END;

这篇关于如何在甲骨文顶点插入类似瀑布图的瀑布图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆