Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regions replace does not work in regions API

See original GitHub issue

The regions API has a method for replacing regions:

  {axis: 'x', start: 5, class: 'regionX'},
  {axis: 'y', end: 50, class: 'regionY'}

In practice, this only seems to work for initializing a region (cf. regions.add()), but not updating a region. E.g. in this fiddle, the first setTimeOut function will set a region, the second one does nothing.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

martingrahamcommented, Mar 21, 2017

You can push the g parent elements data down to the rect element by doing .select rather than .selectAll (it’s a little-known d3 effect that often causes errors rather than solves them)

Since there’s only 1 rect per group element there’s no problem with not using .selectAll

        regions = $$.mainRegion.selectAll('rect').each(function () {
            // data is binded to g and it's not transferred to rect (child node) automatically,
            // then data of each rect has to be updated manually.
            // TODO: there should be more efficient way to solve this?
            var parentData = $$;

becomes regions = $$'rect'),

drewkiimoncommented, Sep 15, 2021

Having this problem still as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regions and Amazon SES - Amazon Simple Email Service
Amazon SES is available in several AWS Regions around the world. In each Region, AWS maintains multiple Availability Zones. These Availability Zones are...
Read more >
Working with Regions | Keyhole Markup Language
A Region affects visibility of a Placemark's geometry or an Overlay's image. Regions define both culling and level-of-detail behavior of the affected geometry ......
Read more >
describe-regions — AWS CLI 2.9.11 Command Reference
Describes the Regions that are enabled for your account, or all Regions. For a list of the Regions supported by Amazon EC2, see...
Read more >
How do I order a replacement card? - Regions Bank
Need to replace a lost, stolen or damaged card? Visit our FAQs page for information on requesting a replacement card or contact Card...
Read more >
General Concepts | HTTP API - commercetools documentation
User accounts created for one Region are not valid for other Regions. ... {region} , replace the {region} placeholder with the actual ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found