INNER CODE UNIT · JavaScript
show
sirius-ms/sirius · lcms2/viewer/viewer.js:114
function show(data) {
xaxis = data.rt;
var container = d3.select("#chart")
// Declare the chart dimensions and margins.
const width = PLOT_WIDTH;
const height = PLOT_HEIGHT;
const marginTop = 20;
const marginRight = 20;
const marginBottom = 30;
const marginLeft = 40;
function getColor(index) {
// Calculate hue based on the index
const hue = (index * 137.508) % 360;
// Set saturation and lightness to reasonable values
const saturation = 70;
const lightness = 60;