You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-24
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ npm install stream-charts
30
30
31
31
For the neuron raster chart (see [example](https://github.com/robphilipp/stream-charts-examples/blob/master/src/app/examples/StreamingRasterChart.tsx))
32
32
33
-
```typescript
33
+
```typescript jsx
34
34
import {RasterChart} from"stream-charts";
35
-
.
36
-
.
37
-
.
35
+
//.
36
+
//.
37
+
//.
38
38
<RasterChart
39
39
width={plotWidth}
40
40
height={seriesHeight}
@@ -56,11 +56,11 @@ import {RasterChart} from "stream-charts";
56
56
57
57
and for the scatter chart (see [example](https://github.com/robphilipp/stream-charts-examples/blob/master/src/app/examples/StreamingScatterChart.tsx))
58
58
59
-
```typescript
59
+
```typescript jsx
60
60
import {ScatterChart} from"stream-charts";
61
-
.
62
-
.
63
-
.
61
+
//.
62
+
//.
63
+
//.
64
64
<ScatterChart
65
65
width={plotWidth}
66
66
height={plotHeight}
@@ -117,15 +117,15 @@ Except for the plot height and width, *style* properties are optional. Style pro
117
117
118
118
All the optional *style* properties have defaults (the defaults look like the example charts above). The defaults can be overridden by specifying the properties you would like to change. For example, if you would like to change only the size of the font used for the axes labels, then you can specify the property as,
119
119
120
-
```typescript
120
+
```typescript jsx
121
121
<ScatterChart
122
-
.
123
-
.
124
-
.
122
+
//.
123
+
//.
124
+
//.
125
125
axisLabelFont={{color: 'blue'}}
126
-
.
127
-
.
128
-
.
126
+
//.
127
+
//.
128
+
//.
129
129
/>
130
130
```
131
131
@@ -155,7 +155,7 @@ The *data* properties define the data source, processing, and constraints.
155
155
156
156
##### Understanding the time-window
157
157
158
-
These charts have been develop to be used with high-frequency dynamic data that my run for a considerable amount of time. For example, you may stream in data for a few hundred seconds, and have the plot show the last 10 seconds worth of data. To achieve this you use the `timeWindow` property. Because you want to see the most recent 10 seconds of data, you set the time-window property to 10,000 ms (`timeWindow={10000}`). The charts use the time-window property and the current simulation time to show the most recent `timeWindow` milliseconds of data (in our example, the past 10 seconds). This causes the data to "slide" to the left after `timeWindow` has elapsed.
158
+
These charts have been developed to be used with high-frequency dynamic data that my run for a considerable amount of time. For example, you may stream in data for a few hundred seconds, and have the plot show the last 10 seconds worth of data. To achieve this you use the `timeWindow` property. Because you want to see the most recent 10 seconds of data, you set the time-window property to 10,000 ms (`timeWindow={10000}`). The charts use the time-window property, and the current simulation time, to show the most recent `timeWindow` milliseconds of data (in our example, the past 10 seconds). This causes the data to "slide" to the left after `timeWindow` has elapsed.
159
159
160
160
#### enhancements
161
161
@@ -192,7 +192,7 @@ By default, when the charts mount, they subscribe to the specified observable. T
192
192
193
193
You hand the `stream-charts` an [Observable](https://rxjs-dev.firebaseapp.com/api/index/class/Observable). This defines how (i.e. the pipeline) the data is generated. Only upon subscription does data flow through this pipeline. The rxjs `Observable.subscribe(...)` function returns a [Subscription](https://rxjs-dev.firebaseapp.com/api/index/class/Subscription) that can be used to stop the data.
194
194
195
-
An example of an observable can be found in the [randomSpikeDataObservable(...)](src/app/examples/randomData.ts) function.
195
+
An example of an observable can be found in the [randomSpikeDataObservable(...)](./src/app/examples/randomData.ts) function.
196
196
197
197
One reason to provide an `onSubscription` callback is so that you have a handle on the subscription so that you can stop the data. For example, you may want to provide the user of your application a button to stop the data. Or, you may wish to stop the simulation after a certain period of time.
198
198
@@ -210,18 +210,18 @@ If you are only interested in the current time, you can use the `onUpdateTime` c
210
210
211
211
When the time associated with the data in the stream changes, this callback provides a hook into that time. In the [StreamingScatterChart](src/app/examples/StreamingScatterChart.tsx), for example, this callback is used to stop the random data after 1 second (1000 ms) by cancelling the subscription.
0 commit comments