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

Resolve problems with VisitorMap #8082

Merged
merged 4 commits into from Jun 10, 2015
Merged

Conversation

andrzejewsky
Copy link

Resulve issues:
#8081 - now, if we have unknow regions, the legend will not appear
#8060 - changed z-index

@mnapoli
Copy link
Contributor

mnapoli commented Jun 10, 2015

Hi, thank you for the patch. I'm testing it locally and I get errors:

Uncaught TypeError: Cannot read property 'push' of undefined

It seems to happen around here, I'm having a deeper look to try and fix it but if you have a fix feel free to push it.

@mnapoli
Copy link
Contributor

mnapoli commented Jun 10, 2015

I think this change is better to fix #8081:

if (stats.min == stats.max) {
    colscale = function () { return chroma.hex(oneCountryColor); };
    if (choropleth) {
        $('.UserCountryMap-legend .content').html('').show();
+        if (values.length > 0) {
            addLegendItem(stats.min, true);
+        }
    }
    return colscale;
}

It will not show the legend if there are no values.

@andrzejewsky
Copy link
Author

@mnapoli the error with push is occurring, because to the chroma.limits we put a empty array (values). This commit dfcfb3d will fix it

@mnapoli
Copy link
Contributor

mnapoli commented Jun 10, 2015

Sounds nice now, I will test again

@mnapoli mnapoli added Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Jun 10, 2015
@mnapoli mnapoli added this to the 2.14.0 milestone Jun 10, 2015
@mnapoli mnapoli added the Needs Review PRs that need a code review label Jun 10, 2015
@mnapoli
Copy link
Contributor

mnapoli commented Jun 10, 2015

I can confirm it fixes #8081.

And it fixes the z-index problem of #8060 but not the other problems mentioned in that issue. We'll need to fix those separately.

Thanks for the fix, I'll merge it.

mnapoli added a commit that referenced this pull request Jun 10, 2015
Resolve problems with VisitorMap
@mnapoli mnapoli merged commit 2f5fd73 into matomo-org:master Jun 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants