![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
dc-tableview
Advanced tools
dc-tableview
is an interactive chart for dc.js library that presents data in tableview form.
It was created because I was missing some functionality in the original table that comes with dc. I designed it so that it can easily replace dc.dataTable in your projects.
It is build on top of well known DataTables jQuery plugin
Several quick start options are available:
bower install dc-tableview --save
npm install dc-tableview --save
To clone the repository, use
git clone https://github.com/karenpommeroy/dc-tableview.git
grunt build
Done!
This library is created as an UMD module which means you can use it as an AMD or CommonJS module as well as a standalone library.
require("dc-tableview");
dc.tableview(div, "chartGroupName");
<script src="/path/to/dc-tableview.js"></script>
<script>
dc.tableview.doSomething();
</script>
There are couple of dependencies that are required by dc-tableview
.
Two libraries are essential for every build: dc.js and jquery
Bootstrap.js is required if you are going to use bootstrap ready version.
In order to run the examples you also need to include d3.js and crossfilter2
Initialization is performed the same as for any other chart in dc.js:
var chart = dc.tableview(div, "chartGroupName");
dc-tableview
is written so that it can replace standard data table included in dc without any big changes in existing code.
It mixes in dc.baseMixin and implements all of the methods of the original dc.dataTable.
Initialization looks like this:
var chart = dc.tableview(".chart .container", "chartGroupName");
Get or set the index of the beginning slice which determines which entries get displayed by the widget. Useful when implementing pagination. See: https://dc-js.github.io/dc.js/docs/html/dc.dataTable.html#beginSlice
var slice = chart.beginSlice();
chart.beginSlice(5);
Get or set buttons available for the chart.
chart.buttons(["csv", "pdf", "excel", "print"])
Removes tableview from DOM.
chart.clean();
Gets or sets column definitions to be used. For details check out: https://datatables.net/reference/option/columns
chart.columns([
{ title: "Experiment", data: "Expt" },
{ title: "Run", data: "Run" },
{ title: "Speed", data: "Speed" },
]);
Get or set dataSource to be be used for the table. By default dataSource is obtained based on dimension however you can supply your own data independently. See details here: https://datatables.net/manual/data/#Data-sources
chart.dataSource({});
Get or set order of chart components. Described in details here: https://datatables.net/reference/option/dom
chart.dom("Bftip");
Get status or enable/disable automatic column width calculation.
chart.enableAutoWidth(true);
Get status or enable/disable reordering of columns.
chart.enableColumnReordering(true);
Get status or set whether to show or hide header row.
chart.enableHeader(true);
Get status or enable/disable paging.
chart.enablePaging(true);
Get status or enable/disable paging info text.
chart.enablePagingInfo(true);
Get status or enable/disable paging size change combo box.
chart.enablePagingSizeChange(true);
Get status or enable/disable search (filter) input.
chart.enableSearch(true);
Get or set the index of the end slice which determines which entries get displayed by the widget. See: https://dc-js.github.io/dc.js/docs/html/dc.dataTable.html#endSlice
tableview.endSlice();
Enable or disable fixed header that will be always visible.
chart.fixedHeader(true);
Returns underlying DataTable object for advanced manipulation. For more info checkout DataTables repository (https://github.com/DataTables/Dist-DataTables) and documentation.
var dt = chart.getDataTable();
Get or set column name that the grouping should be applied by.
chart.groupBy("id");
Attach event handlers to chart.
chart.listeners({
rowClicked: function (row, data, index) {
},
rowDblClicked: function (row, data, index) {
},
rowEnter: function (row, data, index) {
},
rowLeave: function (row, data, index) {
}
});
Gets or sets default sort type used in the chart. This will be used if order is not specified using sortBy() function.
chart.order("asc");
Get or set text used by pagin info control. You can use following placeholders here that will be replaced by actual values: START, END, TOTAL;
chart.pagingInfoText("Showing _START_ - _END_ of _TOTAL_ items");
Get or set the name of the column that will be used as row id
chart.rowId(id");
Get or set the value for height at which scroll should be visible.
chart.scrollY("250px");
Get current status or enable/disable data grouping. This must be enabled in order for groupBy() to work
chart.showGroups(true);
Get or set the table size which determines the number of rows displayed.
var size = chart.size();
chart.size(25)
Get or set fields that data is sorted by along with sort order. Multiple sorts are allowed at the same time.
chart.sortBy([["first", "desc"], ["second", "asc"]]);
All of the exposed methods return dc-tableview
object so chaining subsequent calls is possible.
An example of this would be:
var chart = dc.tableview(".container", "name");
chart.enableHeader(false)
.fixedHeader(true)
.enableAutoWidth(true)
.rowId("id") // and so on...
Click one of the links below to see dc-tableview in action:
All of above examples are available in the examples folder located in the repository.
Licensed under MIT license.
FAQs
Feature rich, interactive table component (chart) for dc.js library
The npm package dc-tableview receives a total of 3 weekly downloads. As such, dc-tableview popularity was classified as not popular.
We found that dc-tableview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.