Search

Multiple Recipients

Events

Model broadcast events from one source to many targets.

Multiple Recipients
View live example →

Events can have multiple targets or recipients.

Here, emails are modeled as instantaneous events from one email address to one or many other email addresses.

When arrows are shown, the event is directed from the first event in entityIds to the rest of the entities.

See also:

import { createTimeline } from "kronograph";
import { entities, events, entityTypes, eventTypes } from "./data";

document.fonts.load('400 16px "Font Awesome 5 Free"');

document.fonts.ready.then(() => {
  const timeline = createTimeline("my-timeline");
  timeline.options({ events: { joinStyle: "horizontal" } });
  timeline.set({ entities, events, eventTypes, entityTypes });
  timeline.fit();
});
export const events = {
  event1: {
    entityIds: [
      "[email protected]",
      "[email protected]",
      "[email protected]",
      "[email protected]",
      "[email protected]",
      "[email protected]",
    ],
    time: Date.UTC(2016, 3, 28, 11, 15, 14),
  },
  event2: {
    entityIds: ["[email protected]", "[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 15, 51),
  },
  event3: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 14, 21),
  },
  event4: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 16, 54),
  },
  event5: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 17, 40),
  },
  event6: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 18, 51),
  },
  event7: {
    entityIds: [
      "[email protected]",
      "[email protected]",
      "[email protected]",
    ],
    time: Date.UTC(2016, 3, 28, 11, 19, 9),
  },
  event8: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 19, 35),
  },
  event9: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 20, 8),
  },
  event10: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 21, 25),
  },
};

export const entities = {
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
};

export const eventTypes = {
  default: {
    color: "#f7d06e",
    fontIcon: {
      text: "\u{f0e0}",
      fontFamily: "Font Awesome 5 Free",
      fontWeight: 400,
      scale: 1.4,
      dy: 3,
    },
  },
};

export const entityTypes = {
  default: {
    lineWidth: 0.5,
  },
};
<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="@ci/theme/kg/css/examples.css" />
  </head>
  <body>
    <div id="my-timeline" style="height: 100vh"></div>
    <script type="module" src="./code.js"></script>
  </body>
</html>
import React, { useEffect, useState } from "react";
import { createRoot } from "react-dom/client";
import Timeline from "kronograph/react/Timeline";
import { entities, events } from "./data";

const eventTypes = {
  default: {
    color: "#f7d06e",
    fontIcon: {
      text: "\u{f0e0}",
      fontFamily: "Font Awesome 5 Free",
      fontWeight: 400,
      scale: 1.4,
      dy: 3,
    },
  },
};

const entityTypes = {
  default: {
    lineWidth: 0.5,
  },
};

export const Demo = () => {
  const [fontsReady, setFontsReady] = useState(false);

  useEffect(() => {
    document.fonts.load('400 16px "Font Awesome 5 Free"');
    document.fonts.ready.then(() => {
      setFontsReady(true);
    });
  }, []);

  if (!fontsReady) {
    return null;
  }

  return (
    <Timeline
      entityTypes={entityTypes}
      eventTypes={eventTypes}
      entities={entities}
      events={events}
      options={{ events: { joinStyle: "horizontal" } }}
    />
  );
};

const root = createRoot(document.getElementById("my-timeline"));
root.render(<Demo />);
export const events = {
  event1: {
    entityIds: [
      "[email protected]",
      "[email protected]",
      "[email protected]",
      "[email protected]",
      "[email protected]",
      "[email protected]",
    ],
    time: Date.UTC(2016, 3, 28, 11, 15, 14),
  },
  event2: {
    entityIds: ["[email protected]", "[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 15, 51),
  },
  event3: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 14, 21),
  },
  event4: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 16, 54),
  },
  event5: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 17, 40),
  },
  event6: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 18, 51),
  },
  event7: {
    entityIds: [
      "[email protected]",
      "[email protected]",
      "[email protected]",
    ],
    time: Date.UTC(2016, 3, 28, 11, 19, 9),
  },
  event8: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 19, 35),
  },
  event9: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 20, 8),
  },
  event10: {
    entityIds: ["[email protected]", "[email protected]"],
    time: Date.UTC(2016, 3, 28, 11, 21, 25),
  },
};

export const entities = {
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
  "[email protected]": {},
};

export const eventTypes = {
  default: {
    color: "#f7d06e",
    fontIcon: {
      text: "\u{f0e0}",
      fontFamily: "Font Awesome 5 Free",
      fontWeight: 400,
      scale: 1.4,
      dy: 3,
    },
  },
};

export const entityTypes = {
  default: {
    lineWidth: 0.5,
  },
};
<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="@ci/theme/kg/css/examples.css" />
  </head>
  <body>
    <div id="my-timeline" style="height: 100vh"></div>
    <script type="module" src="./code.jsx"></script>
  </body>
</html>

Terms of use

These terms do not alter or supersede any existing agreements between you (or your employer) and us.

By accessing or using any Content you agree to be bound by these Terms of Use. Please review these terms carefully before using the website.

The contents of this website, including but not limited to any text, code samples, API references, schemas, interactive tools, and other materials (collectively, the 'Content'), are made available for informational and internal evaluation purposes only. All intellectual property rights in the Content are reserved. No licence is granted to use the Content for any commercial purpose, or to copy, distribute, modify, reverse-engineer, or incorporate any part of the Content into any product or service, without our prior written consent.

This Content is provided “as is” and “as available,” without any representations, warranties, or guarantees of any kind, whether express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, non-infringement, or accuracy. To the fullest extent permitted by applicable law, we expressly exclude and disclaim all implied warranties, conditions, and other terms that might otherwise be implied.

We disclaim all liability for any loss or damage, whether direct, indirect, incidental, consequential, or otherwise, arising from any reliance placed on the Content or from your use of it, to the fullest extent permitted by applicable law. By continuing to access or use the Content, you acknowledge and agree to these terms.