datapoint

How to view the last 10 DataPoints in a chart that's updating each second?

眉间皱痕 提交于 2020-01-03 13:35:11
问题 I have this code: private void timer_Tick(object sender, EventArgs e) { timer.Stop(); for (int i = 0; i < TOTAL_SENSORS; i++) { DateTime d = DateTime.Now; devices[i].Value = float.Parse(serialPort.ReadLine()); if (chart1.Series[i].Points.Count > MAX_POINTS) { //see the most recent points } chart1.Series[i].Points.AddXY(d, devices[i].Value); } timer.Start(); } This part of my code is the timer's tick event where i draw a chart and i need to update it every tick.I keep adding points and when

Retrieving X and Y values from Matlab Plot

十年热恋 提交于 2019-12-28 06:39:11
问题 I have a plot figure and I want to retreive x and y cordinates when we select particular data point using mouse from plot figure. Any ideas? 回答1: Another option is to use the button down function: function mouseExample() h = plot(rand(10,1), 'o-'); set(h, 'ButtonDownFcn',@buttonDownCallback) function buttonDownCallback(o,e) p = get(gca,'CurrentPoint'); p = p(1,1:2); title( sprintf('(%g,%g)',p) ) end end Note this will not only work on "data-points", but rather on interpolated (x,y) positions

SSRS Data label on first and last entry

孤人 提交于 2019-12-25 08:13:42
问题 I have a line graph which tracks days passed on the X-axis. I would like for the data points to be visible on only the first entry and the last entry. I tried the below, which I thought should show only the final entry, but in fact had the opposite effect. =iif(Last(Fields!DateTime.Value),False, True) Changing from the Last to the First (or Max or Min) all have the same effect. An example with data point on only the first entry: Many thanks. 回答1: I figured it out. I needed to show it

SSRS Data label on first and last entry

寵の児 提交于 2019-12-25 08:10:04
问题 I have a line graph which tracks days passed on the X-axis. I would like for the data points to be visible on only the first entry and the last entry. I tried the below, which I thought should show only the final entry, but in fact had the opposite effect. =iif(Last(Fields!DateTime.Value),False, True) Changing from the Last to the First (or Max or Min) all have the same effect. An example with data point on only the first entry: Many thanks. 回答1: I figured it out. I needed to show it

Another “Object does not contain a definition for X”

爱⌒轻易说出口 提交于 2019-12-23 05:41:20
问题 I saw a lot of topics with the problem: "Object does not contain a definition for X and no extension method X accepting a first argument of type Object" But none of them had the solution to my problem. Situation: I want to save 3 series of DataPoints. Therefor i made a List that holds the series: List<OxyPlot.Series.DataPointSeries> filesToBeStored; public OxyPlot.Series.DataPointSeries saveAnalyseBSITotal; public OxyPlot.Series.DataPointSeries saveAnalyseSBSI; public OxyPlot.Series

How to drag a DataPoint and move it in a Chart control

最后都变了- 提交于 2019-12-19 04:02:05
问题 I want to be able to grab a datapoint drawn in a chart and to move it and change its position by dragging it over the chart control. How can I .. ..grab the specific series point (series name ="My Series") When released the series point should change its position/ values It's like making series points movable with drag event. Here the color dots (points) should be able to move: There are some charts like devExpress chart which perform this task but I want to do it in normal MS chart. 回答1:

How to attach a DataPoint with a Theory?

自作多情 提交于 2019-12-05 10:36:10
问题 @DataPoints public static final Integer[] input1={1,2}; @Theory @Test public void test1(int input1){ } @DataPoints public static final Integer[] input2={3,4}; @Theory @Test public void test2(int input2 ){ } I want that test1 runs with data set input1 - {1,2} and test2 runs with input2 - {3,4}. But currently each test runs with both the data sets {1,2,3,4}. How to bind specific @DataPoints to specific @Theorys 回答1: DataPoints apply to the class. If you have a @Theory method which takes an int,

How to attach a DataPoint with a Theory?

心已入冬 提交于 2019-12-04 00:17:18
@DataPoints public static final Integer[] input1={1,2}; @Theory @Test public void test1(int input1){ } @DataPoints public static final Integer[] input2={3,4}; @Theory @Test public void test2(int input2 ){ } I want that test1 runs with data set input1 - {1,2} and test2 runs with input2 - {3,4}. But currently each test runs with both the data sets {1,2,3,4}. How to bind specific @DataPoints to specific @Theorys DataPoints apply to the class. If you have a @Theory method which takes an int, and you have a DataPoint which is an array of ints, then it will be called with the int. @RunWith(Theories

Retrieving X and Y values from Matlab Plot

有些话、适合烂在心里 提交于 2019-11-28 00:29:37
I have a plot figure and I want to retreive x and y cordinates when we select particular data point using mouse from plot figure. Any ideas? Another option is to use the button down function: function mouseExample() h = plot(rand(10,1), 'o-'); set(h, 'ButtonDownFcn',@buttonDownCallback) function buttonDownCallback(o,e) p = get(gca,'CurrentPoint'); p = p(1,1:2); title( sprintf('(%g,%g)',p) ) end end Note this will not only work on "data-points", but rather on interpolated (x,y) positions of where you clicked on the lines. You could process the result by searching for the nearest actual point,