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

Feature: graphType text to display text in the canvas #259

Merged
merged 4 commits into from
Dec 16, 2023
Merged

Conversation

mauriciopoppe
Copy link
Owner

@mauriciopoppe mauriciopoppe commented Dec 16, 2023

There's a new graphType: 'text' used to display random text anywhere in the graph, the text is bound to the usual zoom/pan operations so it remains anchored to its location.

See the main page for an example.

functionPlot({
  target: '#text',
  data: [
    {
      graphType: 'text',
      location: [1, 1],
      text: 'hello world'
    },
    {
      graphType: 'text',
      location: [-1, -1],
      text: 'foo bar',
      attr: {
        'text-anchor': 'end'
      }
    }
  ]
})

Fixes #253

@mauriciopoppe mauriciopoppe merged commit 28df473 into master Dec 16, 2023
7 checks passed
@mauriciopoppe mauriciopoppe deleted the add-text branch December 16, 2023 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Labeling points?
1 participant