Skip to content

Commit

Permalink
Updating jQuery package
Browse files Browse the repository at this point in the history
- removed lens functions (deprecated)
- updated default height and width to 100%
- updated zingchart version in examples
- updated html examples
- update animationEnd to animation_end (bug)
  • Loading branch information
Nicholas E. Ardecky committed Oct 19, 2016
1 parent 5e03cd8 commit 11c4ca0
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 80 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 PINT, Inc.
Copyright (c) 2016 ZingChart.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
42 changes: 0 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1711,18 +1711,6 @@ Return | jQuery | [jQuery Object](http://api.jquery.com/Types/#jQuery)
$("#myChart").toggleLegend();
```

<br>
#### .toggleLens() ####
Toggle the visibility of the lens.

Value | Type | Details
--- | --- | ---
Return | jQuery | [jQuery Object](http://api.jquery.com/Types/#jQuery)

```javascript
$("#myChart").toggleLens();
```

<br>
#### .toggleSource() ####
Toggle the visibility of the View Source Screen.
Expand Down Expand Up @@ -3056,36 +3044,6 @@ $("#myChart").dimensionChange(function(){
});
```

<br>
#### .lensShow( callback )
Fires the callback when the lens is shown.

Value | Type | Details
--- | --- | ---
Parameter | [Callback](https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/Callbacks)
Return | [jQuery](http://api.jquery.com/Types/#jQuery)

```javascript
$("#myChart").lensShow(function(){
// Make some magic
});
```

<br>
#### .lensHide( callback )
Fires the callback when the lens is hidden.

Value | Type | Details
--- | --- | ---
Parameter | [Callback](https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/Callbacks)
Return | [jQuery](http://api.jquery.com/Types/#jQuery)

```javascript
$("#myChart").lensHide(function(){
// Make some magic
});
```

<br>
#### .sourceShow( callback )
Fires the callback when the source is shown.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ZingChart-jQuery",
"version": "1.0.3",
"version": "2.0.0",
"homepage": "https://github.com/zingchart/ZingChart-jQuery",
"authors": [
"ZingChart"
Expand Down
11 changes: 8 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,13 @@
*/

// example three
$('#ex_3').zingchart({data:data});
$('#ex_3_button').click( function() {
$('#ex_3').zingchart({data: {
type: 'line',
series: [{values: [1,2,3,4,5,6,7]}]
}
});
$('#ex_3_button').click( function(e) {
$('#ex_3').setType( 'area').setTitle( 'new title' );
});
});
</script>
Expand Down Expand Up @@ -1003,7 +1008,7 @@ <h1>Example 3: Chaining on your ZingChart object</h1>
var myChart = $('#myDiv').zingchart( { data: data } );

$('#button').click( function() {
myChart.setData( { type: 'area' } ).title( 'new title' );
myChart.setType('area').setTitle( 'new title' );
});
</pre>
<button id="ex_3_button">change to area and reset title</button>
Expand Down
2 changes: 1 addition & 1 deletion docs/table-convert.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../zingchart-html5-min.js"></script>
<script src="../zingchart.min.js"></script>
<script src="../zingchart.jquery.js"></script>
<script src="../zingify/zingify.jquery.js"></script>
<!-- <style type="text/css">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zingchart-jquery",
"version": "1.0.3",
"version": "2.0.0",
"description": "Build fast and powerful charts with ZingChart and jQuery",
"main": "zingchart.jquery.min.js",
"directories": {
Expand Down
31 changes: 5 additions & 26 deletions zingchart.jquery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* View the README.md for detailed documentation. */
/* Version 1.0.1 | Last Updated 22 Dec. 2014 */
/* Version 2.0.0 | Last Updated 19 Oct. 2016 */

(function ( $ ) {

Expand All @@ -11,7 +11,9 @@
$.fn.zingchart = function (options) {
var id = this[0].id;
var defaults = {
id: id
id: id,
height: '100%',
width: '100%'
};
$.extend(defaults, options);
zingchart.render(defaults);
Expand Down Expand Up @@ -703,11 +705,6 @@
return this;
};

$.fn.toggleLens = function () {
zingchart.exec(this[0].id, "togglelens");
return this;
};

$.fn.toggleSource = function () {
zingchart.exec(this[0].id, "togglesource");
return this;
Expand Down Expand Up @@ -756,7 +753,7 @@
// ANIMATION EVENTS ====================================================
$.fn.animationEnd = function (callback) {
var jq = this;
zingchart.bind(this[0].id, "animationEnd", function(p){
zingchart.bind(this[0].id, "animation_end", function(p){
$.extend(jq,{event:p});
callback.call(jq)
});
Expand Down Expand Up @@ -1321,24 +1318,6 @@
return this;
};

$.fn.lensShow = function (callback) {
var jq = this;
zingchart.bind(this[0].id, "lens_show", function(p){
$.extend(jq,{event:p});
callback.call(jq)
});
return this;
};

$.fn.lensHide = function (callback) {
var jq = this;
zingchart.bind(this[0].id, "lens_hide", function(p){
$.extend(jq,{event:p});
callback.call(jq)
});
return this;
};

$.fn.sourceShow = function (callback) {
var jq = this;
zingchart.bind(this[0].id, "source_show", function(p){
Expand Down
2 changes: 1 addition & 1 deletion zingchart.jquery.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions zingchart.min.js
100644 → 100755

Large diffs are not rendered by default.

0 comments on commit 11c4ca0

Please sign in to comment.