Giter Site home page Giter Site logo

devexpress-examples / how-to-customize-the-appearance-of-selected-series-points-t209781 Goto Github PK

View Code? Open in Web Editor NEW
0.0 55.0 0.0 123 KB

This example shows how to create a custom series model and change the selection color for series points.

License: Other

C# 49.77% Visual Basic .NET 50.23%
dotnet dxcharts wpf xpf

how-to-customize-the-appearance-of-selected-series-points-t209781's Introduction

Chart for WPF - How to Customize the Appearance of Selected Series Points

This example shows how to create a custom series model and change the selection color for series points.

Chart

  1. Create an object that represents a custom model of a particular series CustomBar2DModel and assign it to the Model property of a corresponding series type (BarSeries2D.Model).

  2. Create the System.Windows.Controls.ControlTemplate object which contains a Border element to create your own custom model.

  3. Assign this template to the PointTemplate property of a custom series model (CustomBar2DModel.PointTemplate).

  4. Create the IsSelectedConverter. For this, create the IsSelectedToBrushConverter class inherited from IValueConverter. Then, implement Convert  and ConvertBack methods. The Convert method returns black if the IsSelected value is true; otherwise, red.

  5. Bind the Border.Background property to the SeriesPointPresentationData.IsSelected property with IsSelectedToBrushConverter from the static resource. Set the ChartControl.SelectionMode property to Multiple to enable chart selection. 

Files to Review

Documentation

how-to-customize-the-appearance-of-selected-series-points-t209781's People

Contributors

alexilia avatar devexpressexamplebot avatar ritazakhodyaeva avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.