
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
This is the Javascript library for handling Compact JSON Time Series Data (CJTSD) data in either client or server environment.
API documentation is available here.
Latest version can be found on npm and bower
The Java library can be found here.
npm install cjtsd --save-dev
var cjtsd = require("cjtsd");
Something similar to this:
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<script src="https://npmcdn.com/cjtsd/dist/cjtsd.min.js"></script>
chart1 = c3.generate({
bindto: '#chart1',
data: {
x: 'time',
xFormat: '%Y-%m-%d %H:%M',
columns: [
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%Y-%m-%d %H:%M'
}
}
}
});
chart2 = c3.generate({
bindto: '#chart2',
data: {
x: 'time',
xFormat: '%Y-%m-%d',
columns: [
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%Y-%m-%d'
}
},
y: {
tick: {
format: d3.format(".2%")
}
},
y2:{
show: true,
tick: {
format: d3.format(",")
}
}
}
});
$.ajax(query)
.done(function(result){
if (!result.error){
var data = cjtsd.from(result);
var timeCol = cjtsd.getFormattedTimestamps(data, 'YYYY-MM-DD', 'time');
var dataCol = cjtsd.prepend(data.n, '# of something');
chart1.load({
columns: [
timeCol,
dataCol
]
});
}
});
$.ajax(query)
.done(function(result){
if (!result.error){
var data = cjtsd.from(result);
var timeCol = cjtsd.getFormattedTimestamps(data, 'YYYY-MM-DD', 'time');
var rateCol = cjtsd.prepend(data.a, 'Rate');
var totalCol = cjtsd.prepend(data.c, 'Count');
chart2.load({
columns: [
timeCol,
rateCol,
totalCol
],
axes: {
'Rate': 'y',
'Count': 'y2'
},
type: 'line',
types:{
'Count': 'bar'
}
});
}
});
var offset = timeZoneOffsets[$("#mainForm select[name=timeZone]").val()];
var data = cjtsd.from(result);
var table = new google.visualization.DataTable();
table.addColumn('date', 'Time');
table.addColumn('number', '# of Play events');
cjtsd.setDataTableTimestampColumn(table, data, 0, 'YYYY-MM-DD HH:mm', offset);
cjtsd.setDataTableColumn(table, data.n, 1);
FAQs
Compact JSON Time Series Data library
We found that cjtsd 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.