gpt4 book ai didi

oracle-apex - Oracle APEX - 同一图表中的多个线型(AnyChart,但任何图表服务都可以使用)

转载 作者:行者123 更新时间:2023-12-04 05:20:52 27 4
gpt4 key购买 nike

我目前正在使用 Oracle Apex 4.1 开发一个图表(使用默认的 AnyChart 插件),该图表具有多个系列,其中包含来自 SQL 查询的动态填充数据。虽然我可以轻松更改每个系列的线条颜色,但我还必须区分具有不同线条样式的线条(例如一条实线、一条虚线、一 strip 有菱形标记的虚线等)据我所知并尝试使用AnyChart 图表的自定义 XML 功能,我似乎无法为每个线条系列设置线条样式。

1) 有没有人有关于如何通过操作 APEX 构建器页面的 CustomXML 部分为每个系列设置线条样式的解决方案?我看不到拆分#DATA# 替换屏幕的方法。

2)有谁知道我可以合并到 APEX 页面中以实现我的目标的另一种解决方案?我不以任何方式依附于 AnyChart。

谢谢你的帮助。下面是我正在寻找的那种解决方案的谷歌图片搜索。

http://www.google.com/imgres?um=1&hl=en&sa=N&tbo=d&biw=1440&bih=799&tbm=isch&tbnid=gel5t-WrO7YnQM:&imgrefurl=http://www.swiftchart.com/example_1.htm&docid=cL4I17cL558p_M&imgurl=http://www.swiftchart.com/line_ex5.png&w=400&h=300&ei=JW6-UO_4C6H62gWK54DoAw&zoom=1&iact=hc&vpx=4&vpy=494&dur=29&hovh=194&hovw=259&tx=79&ty=185&sig=100543309725245412492&page=1&tbnh=139&tbnw=189&start=0&ndsp=26&ved=1t:429,r:20,s:0,i:152

最佳答案

只为那些将寻求相同问题的答案的人。

AnyChart 允许对图表元素应用不同的样式。要执行 OP 想要的操作,您需要在自定义 XML 中定义样式并将它们分配给系列。例如,这是 XML:

<?xml version="1.0" encoding="UTF-8"?>
<anychart>
<charts>
<chart plot_type="CategorizedVertical">

<styles>
<line_style name="style1">
<line enabled="True" thickness="4" color="Rgb(86,86,26)" />
<effects>
<bevel enabled="true" highlight_opacity="0.4" shadow_opacity="0.4" distance="2" />
<drop_shadow enabled="true" opacity="0.3" />
</effects>
<states>
<hover>
<border color="DarkRed" thickness="6" />
</hover>
</states>
</line_style>
<line_style name="style2" parent="style1">
<line color="Rgb(180,180,255)" />
</line_style>
<line_style name="style3" parent="style1">
<line color="Rgb(255,170,170)" dashed="True" dash_length="5" space_length="5" />
</line_style>
</styles>

<data_plot_settings default_series_type="Line">
<line_series>
<marker_settings enabled="false" />
</line_series>
</data_plot_settings>

<!--#DATA#-->
&PAGE_ITEM_WITH_CHART_DATA.

<chart_settings>
<title enabled="false" />
<axes>
<y_axis>
<title>
<text>Salary</text>
</title>
</y_axis>
<x_axis>
<title>
<text>Month</text>
</title>
</x_axis>
</axes>
</chart_settings>
</chart>
</charts>
</anychart>

隐藏的 PAGE_ITEM_WITH_CHART_DATA item 应包含所有图表数据系列。 styles element 定义了用于图表部分的不同样式。我们可以将其中一个分配给整个系列,如下所示:
<data>
<series name="2003 Sales" style="style1">
<point name="January" y="12000" />
<point name="February" y="15000" />
<point name="March" y="16000" />
<point name="April" y="15000" />
<point name="May" y="14000" />
</series>
...
</data>

或者我们可以只为一个点指定一个样式:
<data>
...
<series name="2004 Sales" style="style2">
<point name="January" y="10000" />
<point name="February" y="12000" />
<point name="March" y="18000" style="style3" />
<point name="April" y="11000" />
<point name="May" y="9000" />
</series>
<data>

您可以找到一个带有 XML 代码的示例 here .

关于oracle-apex - Oracle APEX - 同一图表中的多个线型(AnyChart,但任何图表服务都可以使用),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13712540/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com