Giter VIP home page Giter VIP logo

lcu-tutorial-multipleseries-02's Introduction

2D Chart with Multiple PointLineSeries

Best practice of data visualization within Data Analysis in different fields and industries is combining multiple series in one chart to examine and get richer insight about collected data. Moreover, it allows researchers to make conclusions about the researching phenomena out of each data set, to search patterns and relationships both within a collection and across collections. Modify the code from the previous tutorial Simple 2D Chart and create one additional line.

chart with multiple pointline series 2d winforms wpf

1. Generate new data for second series.
// Generate new data for second series.
data = new SeriesPoint[pointCounter];

for (int i = 0; i < pointCounter; i++) 
{ 
   data[i].X = (double)i; 
   data[i].Y = Math.Sin(i * 0.2) * 50 + 50; 
}
2. Create a new PointLineSeries.
// Create another PointLineSeries and set new color and line-pattern for it.
var series2 = new PointLineSeries (chart.ViewXY, chart.ViewXY.XAxes[0], chart.ViewXY.YAxes[0]);
series2.LineStyle.Color = Color.FromArgb(255, 255, 67, 0);
series2.LineStyle.Pattern = LinePattern.DashDot;
series2.Title.Text = "Sinus data";
3. Set data-points into series.
// 3. Set data-points into series.
series2.Points = data;
4. Add series to chart.
// Add series to chart.
chart.ViewXY.PointLineSeries.Add(series2);

Note!

Any series can be reassigned to any created X- and Y-axis by configuring properties AssignXAxisIndex for X-axis index assignment and AssignYAxisIndex for Y-axis index assignment. See Multiple Axes.

lcu-tutorial-multipleseries-02's People

Contributors

arctionjuuso avatar arctionltd avatar

Stargazers

 avatar

Watchers

 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.