
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
@cloudflare/chart-time
Advanced tools
Cloudflare time-based chart presentational components
Installation with yarn is recommended
$ yarn add @cloudflare/chart-time
import React from 'react';
import { Box } from '@cloudflare/component-box';
import { TimeseriesChart } from '../../src';
const randomData = [];
const N_SERIES = 5;
const VAL_MAX_SLOPE = 10; // max amount of val change per time
const TIME_BIN = 60 * 60 * 1000; // 1h
const START_TIME =
Math.round(new Date() / TIME_BIN) * TIME_BIN - 5 * 24 * 60 * 60 * 1000; // 5d
const NOW = new Date();
[...Array(N_SERIES).keys()].forEach(ser => {
let ts = START_TIME;
let val = 0;
while (ts <= NOW) {
const valVar =
Math.round(Math.random() * VAL_MAX_SLOPE * 2) - VAL_MAX_SLOPE;
val += valVar;
val = Math.max(0, val); // prevent negative vals
randomData.push({
ser: `ser${ser + 1}`,
ts: +ts,
val
});
ts += TIME_BIN;
}
});
const ViewComponent = () => (
<div>
{[['line', 'stacked'], ['normalized', 'stream']].map((row, i) => (
<Box key={i} display="flex">
{row.map(type => (
<Box key={type} flex="1">
<TimeseriesChart
type={type}
interpolation="spline"
height={300}
data={randomData}
timeDimension="ts"
seriesDimension="ser"
valueDimension="val"
valueLabel="Units"
/>
</Box>
))}
</Box>
))}
</div>
);
export default ViewComponent;
FAQs
Cloudflare time-based chart presentational components
The npm package @cloudflare/chart-time receives a total of 2,242 weekly downloads. As such, @cloudflare/chart-time popularity was classified as popular.
We found that @cloudflare/chart-time demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 35 open source maintainers 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
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.