Skip to content

Commit 322eccc

Browse files
authored
Merge pull request #17 from legndery/feature/RED-7973-plugin-revamp-new
RD-7379: readme change
2 parents eab8106 + 8ad7bbb commit 322eccc

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ If you are not using any bundler, you can refer the file in a script tag. The li
9494
:height="height"
9595
:dataFormat="dataFormat"
9696
:dataSource="dataSource"
97-
:events="events">
97+
@dataplotRollover="dataplotRollover">
9898
</fusioncharts>
9999
<p>Display Value: {{displayValue}}</p>
100100
</div>
@@ -119,12 +119,12 @@ If you are not using any bundler, you can refer the file in a script tag. The li
119119
height: '300',
120120
dataFormat: 'json',
121121
dataSource: myDataSource,
122-
events: {
123-
dataplotRollover: function (ev, props) {
124-
app.displayValue = props.displayValue
125-
}
126-
},
127122
displayValue: ''
123+
},
124+
methods:{
125+
dataplotRollover: function (e) {
126+
app.displayValue = e.data.displayValue
127+
}
128128
}
129129
}
130130
});
@@ -211,6 +211,20 @@ Vue.component('fusioncharts', FCComponent);
211211
</tr>
212212
</tbody>
213213
</table>
214+
## Working with Events
215+
216+
To attach event listeners to FusionCharts, you can use the `v-on` or `@` operator in the vue-fusioncharts component.
217+
218+
```html
219+
<fusioncharts
220+
:type="type"
221+
:width="width"
222+
:height="height"
223+
:dataFormat="dataFormat"
224+
:dataSource="dataSource"
225+
@eventName="eventHandler">
226+
</fusioncharts>
227+
```
214228

215229
## Contributing
216230

@@ -227,10 +241,7 @@ $ npm start
227241
```
228242

229243
### [Demos and Documentation](https://fusioncharts.github.io/vue-fusioncharts/)
230-
<<<<<<< HEAD
231244

232245
> ### Using Legacy Webpack Templates
233246
> If you are using legacy webpack templates using (ex: `vue init webpack-simple myProject`), you need to use the new UglifyJS webpack plugin as the default plugin doesn't support ES5+ syntaxes.
234247
> Refer here on what to change in the webpack.config.js: https://github.com/vuejs-templates/webpack-simple/issues/166#issuecomment-354394253
235-
=======
236-
>>>>>>> develop

0 commit comments

Comments
 (0)