Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component | Annotations: Introducing new component #299

Closed
wants to merge 70 commits into from

Conversation

rokotyan
Copy link
Contributor

@rokotyan rokotyan commented Nov 8, 2023

A new component that allows placing textual annotations on top of a visualization.

Here's an example of how annotations can be defined

const annotations: AnnotationItem[] = [
    {
      x: '50%',
      y: '98%',
      width: '50%',
      verticalAlign: 'bottom',
      content: [{
        text: 'Bitcoin Price Peaks from 2010 to 2023',
        fontSize: 28,
        fontWeight: 700,
        fontFamily: 'Helvetica',
        color: '#1C72E8',
      },
      {
        text: 'The chart illustrates the historical price peaks of Bitcoin from its inception in 2010 through 2023.',
        fontSize: 18,
        fontFamily: 'Helvetica',
        color: '#282C34',
        fontWeight: 400,
        lineHeight: 1.5,
        marginTop: 8,
      }],
    },
    {
      x: '2%',
      y: '25%',
      width: 100,
      content: 'First peak, June 2011',
      subject: {
        x: () => xScale(peak2011Datum[0]),
        y: () => yScale(peak2011Datum[1]),
        connectorLineStrokeDasharray: '2 2',
        radius: 6,
      },
    },
...
image

Still needs to be done:

  • Wrappers
  • Documentation
  • Website Examples

@rokotyan rokotyan requested a review from reb-dev November 8, 2023 20:02
@rokotyan rokotyan marked this pull request as draft November 8, 2023 20:02
@TasoOneAsia TasoOneAsia added the cla-signed Authors have signed the F5 contributor license agreement label Feb 5, 2024
rokotyan and others added 25 commits March 28, 2024 17:01
reb-dev and others added 27 commits March 28, 2024 17:19
- Provide accessor functions to `linkDistance`, `linkStrength`, and `charge`.
- Set the number of iterations with the `numIterations` property.
- Fix node positions after the simulation to avoid layout shuffling.

#0
- Additional dimmed node styles
- Exporting selectors for dimmed nodes
- Updating the class names

#0
Removing force layout translate because it causes issues when adding new nodes to the graph iteratively

#0
The next config has to be initialized before the comparison.
@reb-dev
Copy link
Collaborator

reb-dev commented Mar 29, 2024

Closing in favor of #359

@rokotyan The commit history on feature/annotations became too cluttered. I made a new branch and cherry picked the relevant commits there, let me know when you have a chance to take a look.

@reb-dev reb-dev closed this Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed Authors have signed the F5 contributor license agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants