
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@flourish/data-popup
Advanced tools
Enable popups with styling and data binding from Flourish
npm install @flourish/data-popup
The settings.yml
file should be imported into your template’s template.yml
file, like this:
- Popups
- property: mypopup
import: "@flourish/data-popup"
Popup(container, state)
creates a Popup appended to container
.
Pass only the state for the popup. For example: Popup("#wrapper", state.mypopup)
Add column names to the popup by calling popup.addColumnNames(data.data.column_names)
.
popup.point(x, y)
points the popup at the given coordinates.
popup.point(element)
points the popup at the center of the given element.
popup.html(html).draw()
shows the popup with the given html. If you don't specify an argument in .html()
it will return the popup html.
popup.draw(datapoint)
passes a data point (eg. from D3) for rendering depending on the settings. You can also pass a decorator function to this call, which will get back the root DOM element for the popup, which you can use to apply additional styling.
For example:
data_popup.point(this).draw(d, function(el) {
el.querySelector("h1").style.color = "red";
});
It's also possible to specify a different template for the popup content. For instance if you want to add an tag or content needs to show in a specific order.
It's possible to pass in a default template when initializing the data popup. Adding data binding names between curly brackets, like {{name_of_data_binding}}
;
For example:
var popup_template = "<img src='{{image}}' /><br /><p>{{name}}</p>";
Popup(container, state, popup_template);
It's possible to add a title to the popup. On default it looks for a data binding called id
and turns that into an <h1>
tag. It's possible to overwrite this in the 4th argument when initializing the Data Popup. For example, when you want to turn a data binding called "name" into the popup title:
Popup(container, state, null, "name");
FAQs
Popup with data insertion
The npm package @flourish/data-popup receives a total of 444 weekly downloads. As such, @flourish/data-popup popularity was classified as not popular.
We found that @flourish/data-popup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 22 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.