By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,948 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,948 IT Pros & Developers. It's quick & easy.

Chart scaling problem in LightningChart SDK

P: 1
Hello everyone,
I am currently getting used to LightningChart SDK for .NET, trying tutorials and moving my own program to the usage of this SDK.
While making a simple Point-Line chart, I encountered a small problem. I receiving chart data from a tested sensor, and the difference in sensor measurement output can vary. However, I don't know how to scale the chart itself dynamically so that user would always see all the data. You can see the problem in attached image - the chart goes up off-screen.
Here is my chart creating func:
Expand|Select|Wrap|Line Numbers
  1. private void CreateChart()
  2.         {
  3.             VoltCh.BeginUpdate();
  5.             AxisX xAxis = VoltCh.ViewXY.XAxes[0];
  6.             xAxis.ValueType = AxisValueType.Number;
  7.             xAxis.SetRange(0, 100); //Let's test first in seconds
  8.             xAxis.Title.Text = "Time";
  10.             AxisY yAxis = VoltCh.ViewXY.YAxes[0];
  11.             yAxis.SetRange(20, 50);
  12.             yAxis.Title.Text = "Voltage [V]";
  13.             PointLineSeries series = new PointLineSeries(VoltCh.ViewXY, xAxis, yAxis);
  15.             VoltCh.ViewXY.PointLineSeries.Add(series);
  16.             VoltCh.EndUpdate();
  17.         }
So, is there a parameter in LightningChart SDK to make in dynamically scale the chart axis or should I make a looping function for that?
Attached Images
File Type: jpg scaleproblem.jpg (65.0 KB, 84 views)
Nov 15 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.