Skip to content

add event to customize cleaning of cell values#68

Merged
agallou merged 2 commits intohighchartTable:masterfrom
agallou:cleanvalue
Dec 6, 2015
Merged

add event to customize cleaning of cell values#68
agallou merged 2 commits intohighchartTable:masterfrom
agallou:cleanvalue

Conversation

@agallou
Copy link
Member

@agallou agallou commented Jun 7, 2015

Exemple of usage :

        $('table.highchart')
          .on('highchartTable.cleanValue', function(value, options) {
               if (options.indexTr == 0) {
                 options.value = options.value.replace(/\$/, '');
               }
          })
      .highchartTable()

List of options passed to the event :

  • value (that's the one that must be changed, contains the value already cleaned by HighchartTable)
  • rawValue : the value not cleaned by HighchartTable
  • td : jQuery objet of the td were the valued is extracted from
  • tr : jQuery objet of the tr where is td is readed from
  • indexTr : index of the tr (starts at 0)
  • indexTd : index of the td (starts at 1)

see #59

agallou added 2 commits June 7, 2015 23:25
Exemple of usage :
```
        $('table.highchart')
          .on('highchartTable.cleanValue', function(value, options) {
               if (options.indexTr == 0) {
                 options.value = options.value.replace(/\$/, '');
               }
          })
	  .highchartTable()
```

List of options passed to the event :
* value (that's the one that must be changed, contains the value already cleaned by HighchartTable)
* rawValue : the value not cleaned by HighchartTable
* td : jQuery objet of the td were the valued is extracted from
* tr : jQuery objet of the tr where is td is readed from
* indexTr : index of the tr (starts at 0)
* indexTd : index of the td (starts at 1)
agallou added a commit that referenced this pull request Dec 6, 2015
add event to customize cleaning of cell values
@agallou agallou merged commit b1903f3 into highchartTable:master Dec 6, 2015
@agallou agallou deleted the cleanvalue branch December 6, 2015 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant