• 界面控件DevExpress BI Dashboard v23.1——支持全新的图标趋势指标


    DevExpress BI Dashboard v23.1支持在Dashboard图表项中使用趋势指标,趋势指标有助于传达一段时间内的数据趋势——允许用户发现模式并更有效地分析复杂的数据集。

    使用DevExpress Analytics Dashboard,再选择合适的UI元素(图表、数据透视表、数据卡、计量器、地图和网格),删除相应参数、值和序列的数据字段,就可以轻松地为执行主管和商业用户创建有洞察力、信息丰富的、跨平台和设备的决策支持系统。

    DevExpress Dashboard v23.1正式版下载(Q技术交流:523159565)

    DevExpress BI Dashboard支持以下趋势指标(跨所有支持的平台):

    • Trend line (ChartTrendLine):显示相关点的大致方向(通常用于识别现有数据趋势和预测未来趋势)。
    • Regression line (ChartRegressionLine):使用数学公式将数据可视化,该数学公式将线本身与相关数据点之间的距离最小化(通常用于对两个变量之间的关系进行建模,并可用于根据另一个变量的值对一个变量进行预测)。
    • Custom Indicator (ChartCustomIndicator):允许您添加自己的指标类型,来可视化销售趋势和呈现财务模式。

    您可以通过Dashboard的UI和代码创建、编辑和删除这些指示器。

    终端用户体验

    最终用户可以通过Dashboard的UI管理趋势指标集合。

    • 在Web Dashboard设计器中,单击Options对话框中的Trend Indicators,打开Trend Indicators编辑器。

    DevExpress BI Dashboard v23.1新功能图集

    • 在WinForms Dashboard设计器中,单击Ribbon's Analysis分组(Data Ribbon页面)中的Trend Indicators按钮。该命令调用Trend Indicators编辑器对话框,编辑器允许用户创建/编辑/删除趋势指标。

    DevExpress BI Dashboard v23.1新功能图集

    使用默认设置生成一个新的指标,用户可以更改指标类型、外观设置或特定于图表系列类型的设置(例如,用户可以选择计算财务系列指标的值:开盘价、高点、低点或收盘价)。

    DevExpress BI Dashboard v23.1新功能图集

    运行时

    在运行时,您需要创建一个ChartTrendLineChartRegressionLine对象,并将其添加到ChartDashboardItem.Indicators中。完成后,使用下面列出的API来指定指标设置。

    此属性是必需的,并在启动应用程序时在图表仪表板项中显示指示器:

    如果不指定以下属性,则使用默认值:

    下面的代码片段一个ASP. NET Core Dashboard应用程序创建了一个“销售趋势”指示器。

    1. using DevExpress.DashboardCommon;
    2. using System.Drawing;
    3. // ...
    4. public partial class CustomIndicatorDashboard : DevExpress.DashboardCommon.Dashboard {
    5. public CustomIndicatorDashboard() {
    6. InitializeComponent();
    7. ChartDashboardItem chartItem = Items.First(x => x.ComponentName == "chartDashboardItem1") as ChartDashboardItem;
    8. ChartTrendLine trendLine = new ChartTrendLine();
    9. SimpleSeries simpleSeries = chartItem.Panes[0].Series[0] as SimpleSeries;
    10. if (simpleSeries != null) {
    11. trendLine.Value = simpleSeries.Value.UniqueId;
    12. }
    13. trendLine.Name = "SalesTrend";
    14. trendLine.ValueLevel = DevExpress.XtraCharts.ValueLevel.Value;
    15. trendLine.Color = Color.Orange;
    16. trendLine.LegendText = "Sales Trend";
    17. chartItem.Indicators.Add(trendLine);
    18. }
    19. }
    添加自定义指标类型

    您可以创建自己的自定义指标类型来满足特定的业务需求:

    • 创建一个ChartCustomIndicator后代,它接受数据点的集合、计算值,并返回结果点,这些点用于绘制指示器。
    • IndicatorFactory 中注册结果类型,来使该类作为指示器类型可用。

    如果使用Web Dashboard,请在呈现控件之前注册ChartIndicatorsExtension(以便将自定义指示器类型添加到Trend Indicators编辑器)。

    下面的代码片段在ASP. NET Core Dashboard中实现/注册一个“移动平均线”自定义指标类型。

    1. using DevExpress.DashboardCommon;
    2. using DevExpress.DashboardCommon.ViewerData;
    3. using System.Collections.Generic;
    4. namespace asp_net_core_dashboard_control_trendline_indicators.Data {
    5. public class MovingIndicator : ChartCustomIndicator {
    6. protected override Dictionaryobject> Calculate(Dictionarydecimal?> values) {
    7. var items = new Dictionaryobject>(values.Count);
    8. var sum = decimal.Zero;
    9. var count = 0;
    10. foreach(KeyValuePairdecimal?> point in values) {
    11. if(count == 0) {
    12. items.Add(point.Key, null);
    13. } else {
    14. items.Add(point.Key, sum / count);
    15. }
    16. sum += point.Value ?? 0;
    17. count++;
    18. }
    19. return items;
    20. }
    21. }
    22. }

    在保存和加载指示板之前,在应用程序中调用Register方法(在指示板的XML中序列化和反序列化指示符)。

    1. using DevExpress.DashboardWeb;
    2. using TrendIndicators.Data;
    3. namespace TrendIndicators {
    4. public static class DashboardUtils {
    5. public static DashboardConfigurator CreateDashboardConfigurator(IConfiguration configuration, IFileProvider fileProvider) {
    6. DashboardConfigurator configurator = new DashboardConfigurator();
    7. // ...
    8. IndicatorFactory.Register("Moving average");
    9. return configurator;
    10. }
    11. }
    12. }
    13. Register ChartIndicatorsExtension before the control is rendered to add MovingIndicator type to the Trend Indicators editor.
    14. function onBeforeRender(dashboardControl) {
    15. // ...
    16. dashboardControl.registerExtension(new DevExpress.Dashboard.Designer.ChartIndicatorsExtension(dashboardControl, {
    17. customIndicatorTypes: [ {
    18. type: 'MovingIndicator',
    19. displayName: 'Moving Average'
    20. }
    21. ]
    22. }));
    23. }

    打开趋势指标编辑器并添加一个新的趋势指标。如果您遵循这个例子,一个新的移动平均类型将在UI中可用:

    DevExpress BI Dashboard v23.1新功能图集

  • 相关阅读:
    nacos基础概念和单机启动
    2022天工杯CTF---crypto1 wp
    zigbee笔记:七、zigbee系统电源管理与睡眠唤醒
    力扣每日一题2022-08-25中等题:分割数组为连续子序列
    [附源码]计算机毕业设计演唱会门票售卖系统Springboot程序
    知识变现海哥:如何把知识卖的更贵、更多、更酷
    IDEA debug调试基础
    算法通关村第十五关:青铜-用4KB内存寻找重复元素
    如何入门 AI:从初学者到人工智能专家的完整指南
    防脱发、再生发
  • 原文地址:https://blog.csdn.net/AABBbaby/article/details/132036669