Skip to content

Commit

Permalink
more readmemes
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Oct 2, 2015
1 parent 4a016df commit 04c39cd
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,11 @@ Plug your normal C3 config into the ```generate``` param. Supply a PubNub channe
<div id="chart"></div>
<script>
eon.chart({
history: false,
channel: "c3-spline",
flow: {
duration: 100
},
generate: {
bindto: '#chart',
data: {
x: 'x',
labels: true
},
axis : {
x : {
type : 'timeseries',
tick: {
format: '%H:%M:%S'
}
}
}
}
});
Expand All @@ -77,8 +64,6 @@ Plug your normal C3 config into the ```generate``` param. Supply a PubNub channe

That's it! Now you can publish messages to the same ```channel``` and they'll render in the graph.

Make sure your messages are in the format that C3 expects! For example:

```js
var pubnub = PUBNUB.init({
publish_key: 'demo',
Expand All @@ -100,8 +85,7 @@ setInterval(function(){

}, 1000);
```

Notice how the ```channel``` matches.
All chart data must exist within an object called ```eon```. Also notice how the ```channel``` matches in both examples.

## More on Publishing Messages

Expand Down

0 comments on commit 04c39cd

Please sign in to comment.