src/graph/GraphControlBox.js
function colorControlInput(id) {
  const data = {
    id: id,
    column: d3form.optionData(`#${id}-col`)
  };
  const preset = d3form.optionData(`#${id}-preset`);
  if (preset.scale.scale === 'ordinal') {
    data.scale = preset.scale;
    return data;
  }
  data.scale = {
    scale: d3form.value(`#${id}-scaletype`),
    domain: [
      d3form.value(`#${id}-domain-from`),
      d3form.value(`#${id}-domain-to`)
    ],
    unknown: '#696969'
  };
  const range = [d3form.value(`#${id}-range-from`)];
  if (d3form.checked(`#${id}-range-enable-mid`)) {
    range.push(d3form.value(`#${id}-range-mid`));
  }
  range.push(d3form.value(`#${id}-range-to`));
  data.scale.range = range;
  return data;
}
function colorControlInput(id) {
  const data = {
    id: id,
    column: d3form.optionData(`#${id}-col`)
  };
  const preset = d3form.optionData(`#${id}-preset`);
  if (preset.scale.scale === 'ordinal') {
    data.scale = preset.scale;
    return data;
  }
  data.scale = {
    scale: d3form.value(`#${id}-scaletype`),
    domain: [
      d3form.value(`#${id}-domain-from`),
      d3form.value(`#${id}-domain-to`)
    ],
    unknown: '#696969'
  };
  const range = [d3form.value(`#${id}-range-from`)];
  if (d3form.checked(`#${id}-range-enable-mid`)) {
    range.push(d3form.value(`#${id}-range-mid`));
  }
  range.push(d3form.value(`#${id}-range-to`));
  data.scale.range = range;
  return data;
}
Get data