Skip to main content

RangeColorizer3D.ValueProvider Property

Gets or sets the provider that specifies a point value the colorizer should use to define the point color.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v21.2.dll

Declaration

public IColorizer3DValueProvider ValueProvider { get; set; }

Property Value

Type Description
IColorizer3DValueProvider

The value provider.

Remarks

Example 1

This example shows how to use the ColorObjectValueProvider3D class to make the colorizer utilize values that the ColorDataMember property provides.

View Example

<dxc:Series3D DisplayName="Series 1">
    <dxc:Series3D.View>
        <dxc:Point3DSeriesView>
            <dxc:Point3DSeriesView.MarkerModel>
                <dxc:Marker3DSpherePointModel SphereDetalizationLevel="Low"/>
            </dxc:Point3DSeriesView.MarkerModel>
            <dxc:Point3DSeriesView.Colorizer>
                <dxc:RangeColorizer3D RangeStops="-0.4 0.4 1.8 2" 
                                      ApproximateColors="True">
                    <dxc:RangeColorizer3D.ValueProvider>
                        <dxc:ColorObjectValueProvider3D/>
                    </dxc:RangeColorizer3D.ValueProvider>
                    <dxc:RangeColorizer3D.Palette>
                        <dxc:YellowPalette/>
                    </dxc:RangeColorizer3D.Palette>
                </dxc:RangeColorizer3D>
            </dxc:Point3DSeriesView.Colorizer>
        </dxc:Point3DSeriesView>
    </dxc:Series3D.View>
    <dxc:SeriesPoint3DDataSourceAdapter DataSource="{Binding Stars}" 
                                        XArgumentDataMember="X" 
                                        YArgumentDataMember="Y"
                                        ValueDataMember="Z" 
                                        ColorDataMember="ColorIndex"/>
</dxc:Series3D>

Example 2

The following example shows how to calculate point colors based on point x-arguments.

Markup

<dxc:Series3D DisplayName="Series 1">
    <dxc:Series3D.View>
        <dxc:Point3DSeriesView>
            <dxc:Point3DSeriesView.MarkerModel>
                <dxc:Marker3DSpherePointModel SphereDetalizationLevel="Low"/>
            </dxc:Point3DSeriesView.MarkerModel>
            <dxc:Point3DSeriesView.Colorizer>
                <dxc:RangeColorizer3D RangeStops="-90000 -60000 -30000 0 30000 60000 90000"
                                      ApproximateColors="True">
                    <dxc:RangeColorizer3D.ValueProvider>
                        <local:ColorizerValueProvider/>
                    </dxc:RangeColorizer3D.ValueProvider>
                    <dxc:RangeColorizer3D.Palette>
                        <dxc:YellowPalette/>
                    </dxc:RangeColorizer3D.Palette>
                </dxc:RangeColorizer3D>
            </dxc:Point3DSeriesView.Colorizer>
        </dxc:Point3DSeriesView>
    </dxc:Series3D.View>
    <dxc:SeriesPoint3DDataSourceAdapter DataSource="{Binding Stars}" 
                                        XArgumentDataMember="X" 
                                        YArgumentDataMember="Y"
                                        ValueDataMember="Z"/>
</dxc:Series3D>

Code-Behind

using DevExpress.Xpf.Charts;
using System;
using System.Windows;

namespace GettingStarted2 {
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
        }
    }
    public class ColorizerValueProvider : IColorizer3DValueProvider {
        public double GetValue(object argumentX, object argumentY, double[] values, object color) {
            return Convert.ToDouble(argumentX);
        }
    }
}
See Also