syncfusion-wpf-olap-gauge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Implementing OLAP Gauges

实现OLAP仪表盘

Guide for implementing the Syncfusion® WPF OLAP Gauge control for displaying Key Performance Indicators (KPI) from OLAP data sources. The OLAP Gauge is ideal for highlighting business-critical KPI information in executive dashboards and report cards, presenting values against goals in an intuitive manner.
本指南介绍如何实现Syncfusion® WPF OLAP Gauge控件,用于展示来自OLAP数据源的关键绩效指标(KPI)。OLAP Gauge控件非常适合在高管仪表盘和报告卡片中突出显示业务关键KPI信息,以直观的方式展示实际值与目标值的对比情况。

When to Use This Skill

适用场景

Use this skill when you need to:
  • Display KPI data from OLAP cubes in gauge format
  • Connect to OLAP data sources (XML/A, SQL Server Analysis Services, Mondrian, ActivePivot)
  • Visualize business metrics with goals, status, and trend indicators
  • Create executive dashboards with KPI visualizations
  • Bind OLAP gauge to offline cubes or local/online servers
  • Customize gauge appearance with frames, themes, and layouts
  • Configure multiple gauges in structured layouts
  • Implement OLAP reports with dimensions and KPI elements
  • Localize OLAP gauge for international applications
  • Add tooltips to display value and goal information
当你需要以下功能时,可使用本内容:
  • 以仪表盘格式展示OLAP多维数据集中的KPI数据
  • 连接OLAP数据源(XML/A、SQL Server Analysis Services、Mondrian、ActivePivot)
  • 可视化业务指标,包含目标值、状态和趋势指示器
  • 创建带有KPI可视化效果的高管仪表盘
  • 将OLAP仪表盘绑定到离线多维数据集或本地/在线服务器
  • 自定义仪表盘外观,包括框架、主题和布局
  • 在结构化布局中配置多个仪表盘
  • 实现包含维度和KPI元素的OLAP报告
  • 为国际化应用本地化OLAP仪表盘
  • 添加工具提示以显示数值和目标值信息

Component Overview

组件概述

The OlapGauge control for WPF provides sophisticated KPI visualization capabilities:
WPF平台的OlapGauge控件提供了成熟的KPI可视化能力:

Key Capabilities

核心功能

  • OLAP Data Binding: Built-in support for XML/A data sources, offline cubes, SQL Server Analysis Services, Mondrian, and ActivePivot servers
  • KPI Visualization: Displays KPI values (pointers), goals (markers), status, and trend indicators
  • Visual Indicators: Traffic lights, road signs, and standard arrow images for status and trend
  • Multiple Gauge Layouts: Customizable row and column layouts for displaying multiple gauges
  • Frame Types: Various built-in frame types (circular, half-circle, full-circle) for rich appearance
  • Theming: Supports Office 2010/2013, Metro, Blend, and VisualStudio themes
  • Tooltips: Interactive tooltips for pointers and markers
  • Customization: Control visibility of headers, labels, factors, and adjust gauge radius
  • Localization: Multi-language support with RTL (Right-to-Left) capability
  • XAML Configuration: Complete design-time control configuration without code-behind
  • OLAP数据绑定:内置支持XML/A数据源、离线多维数据集、SQL Server Analysis Services、Mondrian和ActivePivot服务器
  • KPI可视化:展示KPI数值(指针)、目标值(标记)、状态和趋势指示器
  • 可视化指示器:使用交通灯、路标和标准箭头图标表示状态和趋势
  • 多仪表盘布局:可自定义行列布局以展示多个仪表盘
  • 框架类型:多种内置框架类型(圆形、半圆、全圆),提升视觉效果
  • 主题支持:支持Office 2010/2013、Metro、Blend和VisualStudio主题
  • 工具提示:为指针和标记提供交互式工具提示
  • 自定义配置:控制标题、标签、系数的可见性,调整仪表盘半径
  • 本地化:多语言支持,包含RTL(从右到左)布局能力
  • XAML配置:无需后台代码,即可在设计时完成控件的完整配置

Architecture

架构

OlapGauge Control
├── OlapDataManager (manages OLAP connections)
├── OlapReport (defines cube, dimensions, KPI elements)
├── Gauge Visualization (renders KPI data)
│   ├── Pointers (KPI values)
│   ├── Markers (KPI goals)
│   ├── Status Indicators (visual feedback)
│   └── Trend Indicators (directional arrows)
└── Layout (rows/columns for multiple gauges)
OlapGauge Control
├── OlapDataManager (manages OLAP connections)
├── OlapReport (defines cube, dimensions, KPI elements)
├── Gauge Visualization (renders KPI data)
│   ├── Pointers (KPI values)
│   ├── Markers (KPI goals)
│   ├── Status Indicators (visual feedback)
│   └── Trend Indicators (directional arrows)
└── Layout (rows/columns for multiple gauges)

Documentation and Navigation Guide

文档与导航指南

Getting Started

入门指南

📄 Read: references/getting-started.md
Read this reference when setting up the OLAP Gauge control for the first time:
  • Installing and adding control through Visual Studio
  • Installing and adding control through Expression Blend
  • Adding control programmatically through code-behind
  • Required assembly references (Syncfusion.OlapGauge.WPF, Syncfusion.Olap.Base, etc.)
  • Setting up OlapDataManager with connection strings
  • Creating basic OlapReport with KpiElements and DimensionElements
  • Defining cube names and configuring dimensions
  • Required namespaces (Syncfusion.Olap.Reports, Syncfusion.Olap.Manager, Syncfusion.Windows.Gauge.Olap)
  • Initial rendering and sample output
📄 阅读: references/getting-started.md
首次设置OLAP Gauge控件时,请阅读本参考文档:
  • 通过Visual Studio安装并添加控件
  • 通过Expression Blend安装并添加控件
  • 通过后台代码以编程方式添加控件
  • 所需的程序集引用(Syncfusion.OlapGauge.WPF、Syncfusion.Olap.Base等)
  • 使用连接字符串设置OlapDataManager
  • 创建包含KpiElements和DimensionElements的基础OlapReport
  • 配置多维数据集名称和维度
  • 所需的命名空间(Syncfusion.Olap.Reports、Syncfusion.Olap.Manager、Syncfusion.Windows.Gauge.Olap)
  • 初始渲染效果及示例输出

Data Binding

数据绑定

📄 Read: references/data-binding.md
Read this reference when connecting OLAP Gauge to data sources:
  • Binding to offline cube files (.cub) with physical path
  • Binding to cube in local SQL Server Analysis Services
  • Binding to cube in online SQL Server via XML/A
  • Binding to Mondrian server OLAP cubes
  • Binding to ActivePivot server OLAP cubes
  • Connection string formats for different providers
  • Authentication and credential configuration
  • Setting DataProvider.ProviderName for different servers
  • Troubleshooting connection issues
📄 阅读: references/data-binding.md
将OLAP Gauge连接到数据源时,请阅读本参考文档:
  • 绑定到离线多维数据集文件(.cub),需指定物理路径
  • 绑定到本地SQL Server Analysis Services中的多维数据集
  • 通过XML/A绑定到在线SQL Server中的多维数据集
  • 绑定到Mondrian服务器的OLAP多维数据集
  • 绑定到ActivePivot服务器的OLAP多维数据集
  • 适用于不同提供程序的连接字符串格式
  • 身份验证和凭据配置
  • 为不同服务器设置DataProvider.ProviderName
  • 连接问题排查

KPI Visualization

KPI可视化

📄 Read: references/kpi-visualization.md
Read this reference when working with KPI display features:
  • Understanding KPI elements and structure
  • KPI value representation using pointers
  • KPI goal representation using markers
  • KPI status indicators (traffic lights, road signs)
  • KPI trend indicators (directional arrows)
  • Configuring KpiElement properties (ShowKPIGoal, ShowKPIStatus, ShowKPIValue, ShowKPITrend)
  • Display options for each KPI component
  • Member-KPI combination display patterns
  • Visual feedback for performance metrics
📄 阅读: references/kpi-visualization.md
使用KPI显示功能时,请阅读本参考文档:
  • 了解KPI元素和结构
  • 使用指针表示KPI数值
  • 使用标记表示KPI目标值
  • KPI状态指示器(交通灯、路标)
  • KPI趋势指示器(方向箭头)
  • 配置KpiElement属性(ShowKPIGoal、ShowKPIStatus、ShowKPIValue、ShowKPITrend)
  • 各KPI组件的显示选项
  • 成员-KPI组合的展示模式
  • 绩效指标的视觉反馈

Customization

自定义配置

📄 Read: references/customization.md
Read this reference when customizing gauge layout and behavior:
  • Layout customization with ColumnsCount and RowsCount properties
  • Controlling multiple gauge arrangements
  • Gauge header visibility (ShowGaugeHeaders)
  • Gauge label visibility (ShowGaugeLabels)
  • Gauge factor visibility (ShowGaugeFactors)
  • Complete XAML configuration without code-behind
  • DataSource.ConnectionString and DataSource.ConnectionName properties
  • ReportName and CurrentCubeName configuration in XAML
  • CategoricalAxis, SeriesAxis, and SlicerAxis definition
  • Dimension and KPI elements in XAML markup
  • Calculated members configuration
📄 阅读: references/customization.md
自定义仪表盘布局和行为时,请阅读本参考文档:
  • 使用ColumnsCount和RowsCount属性自定义布局
  • 控制多个仪表盘的排列方式
  • 仪表盘标题可见性(ShowGaugeHeaders)
  • 仪表盘标签可见性(ShowGaugeLabels)
  • 仪表盘系数可见性(ShowGaugeFactors)
  • 无需后台代码,通过XAML完成完整配置
  • DataSource.ConnectionString和DataSource.ConnectionName属性
  • 在XAML中配置ReportName和CurrentCubeName
  • 定义CategoricalAxis、SeriesAxis和SlicerAxis
  • XAML标记中的维度和KPI元素
  • 计算成员配置

Appearance

外观设置

📄 Read: references/appearance.md
Read this reference when styling the gauge appearance:
  • Adjusting gauge radius for size control
  • Built-in frame types (CircularCenterGradient, CircularWithDarkOuterFrames, FullCircle, HalfCircle)
  • Applying themes with SkinStorage.VisualStyle
  • Available themes: Metro, Blend, Office2010Black, Office2010Blue, Office2010Silver
  • Office 2013 themes: LightGray, DarkGray, White
  • VisualStudio2013 theme
  • Setting themes in XAML vs code-behind
  • SfSkinManager.SetVisualStyle usage
📄 阅读: references/appearance.md
设置仪表盘样式时,请阅读本参考文档:
  • 调整仪表盘半径以控制尺寸
  • 内置框架类型(CircularCenterGradient、CircularWithDarkOuterFrames、FullCircle、HalfCircle)
  • 使用SkinStorage.VisualStyle应用主题
  • 可用主题:Metro、Blend、Office2010Black、Office2010Blue、Office2010Silver
  • Office 2013主题:LightGray、DarkGray、White
  • VisualStudio2013主题
  • 在XAML与后台代码中设置主题的方法
  • SfSkinManager.SetVisualStyle的使用

Tooltips and Localization

工具提示与本地化

📄 Read: references/tooltips-localization.md
Read this reference when implementing tooltips or multi-language support:
  • Enabling pointer tooltips (ShowPointersTooltip)
  • Enabling marker tooltips (ShowMarkersTooltip)
  • Tooltip content and formatting
  • Localization overview and translation process
  • Creating resource files (.resx) with proper naming conventions
  • File naming format: Syncfusion.OlapGauge.wpf.<Culture Code>.resx
  • Setting CurrentUICulture for culture specification
  • RTL (Right-to-Left) support with FlowDirection property
  • Combining localization with RTL for Arabic, Hebrew, etc.
📄 阅读: references/tooltips-localization.md
实现工具提示或多语言支持时,请阅读本参考文档:
  • 启用指针工具提示(ShowPointersTooltip)
  • 启用标记工具提示(ShowMarkersTooltip)
  • 工具提示内容和格式
  • 本地化概述和翻译流程
  • 创建符合命名规范的资源文件(.resx)
  • 文件命名格式:Syncfusion.OlapGauge.wpf.<Culture Code>.resx
  • 设置CurrentUICulture以指定区域文化
  • 结合RTL(从右到左)支持FlowDirection属性
  • 为阿拉伯语、希伯来语等语言结合本地化与RTL布局

Quick Start Example

快速入门示例

Basic OLAP Gauge with KPI

基础KPI OLAP仪表盘

xml
<Window x:Class="OlapGaugeApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
    <Grid>
        <syncfusion:OlapGauge x:Name="OlapGauge1"/>
    </Grid>
</Window>
csharp
using Syncfusion.Olap.Manager;
using Syncfusion.Olap.Reports;
using System.Windows;

namespace OlapGaugeApp
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            
            // Create data manager with connection string
            var olapDataManager = new OlapDataManager(
                "Data Source=http://bi.syncfusion.com/olap/msmdpump.dll; " +
                "Initial Catalog=Adventure Works DW 2008 SE;");
            
            // Set OLAP report
            olapDataManager.SetCurrentReport(CreateOlapReport());
            
            // Bind to gauge
            this.OlapGauge1.OlapDataManager = olapDataManager;
        }

        private OlapReport CreateOlapReport()
        {
            OlapReport report = new OlapReport();
            report.CurrentCubeName = "Adventure Works";

            // Configure KPI element
            KpiElements kpiElement = new KpiElements();
            kpiElement.Elements.Add(new KpiElement 
            { 
                Name = "Revenue", 
                ShowKPIGoal = true, 
                ShowKPIStatus = true, 
                ShowKPIValue = true, 
                ShowKPITrend = true 
            });

            // Configure dimensions
            DimensionElement dimensionElement = new DimensionElement();
            dimensionElement.Name = "Date";
            dimensionElement.AddLevel("Fiscal Year", "Fiscal Year");

            // Add elements to report
            report.CategoricalElements.Add(new Item { ElementValue = kpiElement });
            report.CategoricalElements.Add(new Item { ElementValue = dimensionElement });
            
            return report;
        }
    }
}
xml
<Window x:Class="OlapGaugeApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
    <Grid>
        <syncfusion:OlapGauge x:Name="OlapGauge1"/>
    </Grid>
</Window>
csharp
using Syncfusion.Olap.Manager;
using Syncfusion.Olap.Reports;
using System.Windows;

namespace OlapGaugeApp
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            
            // Create data manager with connection string
            var olapDataManager = new OlapDataManager(
                "Data Source=http://bi.syncfusion.com/olap/msmdpump.dll; " +
                "Initial Catalog=Adventure Works DW 2008 SE;");
            
            // Set OLAP report
            olapDataManager.SetCurrentReport(CreateOlapReport());
            
            // Bind to gauge
            this.OlapGauge1.OlapDataManager = olapDataManager;
        }

        private OlapReport CreateOlapReport()
        {
            OlapReport report = new OlapReport();
            report.CurrentCubeName = "Adventure Works";

            // Configure KPI element
            KpiElements kpiElement = new KpiElements();
            kpiElement.Elements.Add(new KpiElement 
            { 
                Name = "Revenue", 
                ShowKPIGoal = true, 
                ShowKPIStatus = true, 
                ShowKPIValue = true, 
                ShowKPITrend = true 
            });

            // Configure dimensions
            DimensionElement dimensionElement = new DimensionElement();
            dimensionElement.Name = "Date";
            dimensionElement.AddLevel("Fiscal Year", "Fiscal Year");

            // Add elements to report
            report.CategoricalElements.Add(new Item { ElementValue = kpiElement });
            report.CategoricalElements.Add(new Item { ElementValue = dimensionElement });
            
            return report;
        }
    }
}

Common Use Cases

常见使用场景

Executive Dashboard with Multiple KPIs

包含多个KPI的高管仪表盘

Display multiple KPI gauges in a structured layout:
csharp
// Configure 2x2 layout for 4 KPIs
this.OlapGauge1.RowsCount = 2;
this.OlapGauge1.ColumnsCount = 2;
以结构化布局展示多个KPI仪表盘:
csharp
// Configure 2x2 layout for 4 KPIs
this.OlapGauge1.RowsCount = 2;
this.OlapGauge1.ColumnsCount = 2;

Offline Cube Binding

离线多维数据集绑定

Connect to a local cube file:
csharp
string connectionString = @"DataSource = C:\Cubes\Adventure_Works_Ext.cub; Provider = MSOLAP;";
OlapDataManager dataManager = new OlapDataManager(connectionString);
连接到本地多维数据集文件:
csharp
string connectionString = @"DataSource = C:\Cubes\Adventure_Works_Ext.cub; Provider = MSOLAP;";
OlapDataManager dataManager = new OlapDataManager(connectionString);

Complete XAML Configuration

完整XAML配置

Define entire OLAP Gauge in XAML without code-behind:
xml
<syncfusion:OlapGauge x:Name="olapGauge" 
                      CurrentCubeName="Adventure Works" 
                      ReportName="SalesReport"
                      olapshared:DataSource.ConnectionString="datasource=localhost; initial catalog=adventure works dw">
    <syncfusion:OlapGauge.CategoricalAxis>
        <syncfusion:Dimension Name="Date" HierarchyName="Fiscal" LevelName="Fiscal Year"/>
        <syncfusion:Kpi Name="Revenue" ShowGoal="True" ShowStatus="True" ShowValue="True"/>
    </syncfusion:OlapGauge.CategoricalAxis>
</syncfusion:OlapGauge>
无需后台代码,完全通过XAML定义OLAP仪表盘:
xml
<syncfusion:OlapGauge x:Name="olapGauge" 
                      CurrentCubeName="Adventure Works" 
                      ReportName="SalesReport"
                      olapshared:DataSource.ConnectionString="datasource=localhost; initial catalog=adventure works dw">
    <syncfusion:OlapGauge.CategoricalAxis>
        <syncfusion:Dimension Name="Date" HierarchyName="Fiscal" LevelName="Fiscal Year"/>
        <syncfusion:Kpi Name="Revenue" ShowGoal="True" ShowStatus="True" ShowValue="True"/>
    </syncfusion:OlapGauge.CategoricalAxis>
</syncfusion:OlapGauge>

Themed Gauge with Tooltips

带工具提示的主题化仪表盘

Apply theme and enable interactive tooltips:
xml
<syncfusion:OlapGauge x:Name="OlapGauge1" 
                      ShowPointersTooltip="True" 
                      ShowMarkersTooltip="True"
                      sfshared:SkinStorage.VisualStyle="Metro"/>
应用主题并启用交互式工具提示:
xml
<syncfusion:OlapGauge x:Name="OlapGauge1" 
                      ShowPointersTooltip="True" 
                      ShowMarkersTooltip="True"
                      sfshared:SkinStorage.VisualStyle="Metro"/>

Key Properties

核心属性

Core Properties

基础属性

PropertyTypeDescription
OlapDataManager
OlapDataManagerManages OLAP connection and data binding
RowsCount
intNumber of rows for multiple gauge layout
ColumnsCount
intNumber of columns for multiple gauge layout
CurrentCubeName
stringName of the OLAP cube to use
ReportName
stringName of the OLAP report
属性类型描述
OlapDataManager
OlapDataManager管理OLAP连接和数据绑定
RowsCount
int多仪表盘布局的行数
ColumnsCount
int多仪表盘布局的列数
CurrentCubeName
string使用的OLAP多维数据集名称
ReportName
stringOLAP报告名称

Visibility Properties

可见性属性

PropertyTypeDefaultDescription
ShowGaugeHeaders
booltrueShow/hide gauge headers
ShowGaugeLabels
booltrueShow/hide gauge labels
ShowGaugeFactors
booltrueShow/hide gauge factors
ShowPointersTooltip
boolfalseEnable tooltips for pointers (values)
ShowMarkersTooltip
boolfalseEnable tooltips for markers (goals)
属性类型默认值描述
ShowGaugeHeaders
booltrue显示/隐藏仪表盘标题
ShowGaugeLabels
booltrue显示/隐藏仪表盘标签
ShowGaugeFactors
booltrue显示/隐藏仪表盘系数
ShowPointersTooltip
boolfalse启用指针(数值)工具提示
ShowMarkersTooltip
boolfalse启用标记(目标值)工具提示

Appearance Properties

外观属性

PropertyTypeDescription
Radius
doubleGauge radius size
FrameType
GaugeFrameTypeFrame style (Circular, HalfCircle, etc.)
FlowDirection
FlowDirectionLayout direction (LeftToRight/RightToLeft)
属性类型描述
Radius
double仪表盘半径大小
FrameType
GaugeFrameType框架样式(圆形、半圆等)
FlowDirection
FlowDirection布局方向(从左到右/从右到左)

XAML Configuration Properties

XAML配置属性

PropertyDescription
DataSource.ConnectionString
OLAP connection string
DataSource.ConnectionName
Connection name from App.Config
SharedDataManagerName
Shared data manager reference
CategoricalAxis
Categorical axis dimensions and KPIs
SeriesAxis
Series axis dimensions
SlicerAxis
Slicer axis dimensions
属性描述
DataSource.ConnectionString
OLAP连接字符串
DataSource.ConnectionName
App.Config中的连接名称
SharedDataManagerName
共享数据管理器引用
CategoricalAxis
分类轴的维度和KPI
SeriesAxis
系列轴的维度
SlicerAxis
切片轴的维度

Related Components

相关组件

Within Data Visualization Category

数据可视化类别内

  • Circular Gauges - For non-OLAP radial gauge visualizations with pointers and ranges
  • Charts - For detailed OLAP data visualization with multiple chart types
  • Circular Gauges - 用于非OLAP的径向仪表盘可视化,支持指针和范围
  • Charts - 用于详细的OLAP数据可视化,支持多种图表类型

Other Syncfusion WPF Components

其他Syncfusion WPF组件

For other WPF components, refer to the main library:
  • Main WPF Library - Complete Syncfusion WPF component documentation
如需了解其他WPF组件,请参考主库:
  • Main WPF Library - 完整的Syncfusion WPF组件文档

Assembly References

程序集引用

Required assemblies for OLAP Gauge:
  • Syncfusion.OlapGauge.WPF
  • Syncfusion.Gauge.WPF
  • Syncfusion.Olap.Base
  • Syncfusion.OlapShared.WPF
  • Syncfusion.Core
  • Syncfusion.Shared.WPF
Location:
{Drive}:\Program Files (x86)\Syncfusion\Essential Studio\{version}\precompiledassemblies\{version}\{framework}\
OLAP Gauge所需的程序集:
  • Syncfusion.OlapGauge.WPF
  • Syncfusion.Gauge.WPF
  • Syncfusion.Olap.Base
  • Syncfusion.OlapShared.WPF
  • Syncfusion.Core
  • Syncfusion.Shared.WPF
位置:
{Drive}:\Program Files (x86)\Syncfusion\Essential Studio\{version}\precompiledassemblies\{version}\{framework}\

Licensing

许可说明

Starting with v16.2.0.x, Syncfusion license key registration is required. Include the license key in your application. Refer to Syncfusion licensing documentation for details.
从v16.2.0.x版本开始,需要注册Syncfusion许可密钥。请在应用中包含许可密钥。详情请参考Syncfusion许可文档