Giter VIP home page Giter VIP logo

plainheart / echarts-extension-gmap Goto Github PK

View Code? Open in Web Editor NEW
41.0 2.0 7.0 543 KB

🌎 A Google Map (https://www.google.com/maps) extension for Apache ECharts (https://github.com/apache/echarts)

Home Page: https://github.com/plainheart/echarts-extension-gmap

License: MIT License

JavaScript 100.00%
echarts google-maps echarts-google-map data-visualization echarts-extension google echarts-gmap echarts4 echarts-map echarts5

echarts-extension-gmap's Introduction

Hi there 👋

Thank you for visiting! Have a nice day~ ✨

echarts-extension-gmap's People

Contributors

dependabot[bot] avatar maeln avatar plainheart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

echarts-extension-gmap's Issues

Size gmap

In your example heatmap.html you defined the size with this :

  <style type="text/css">
    * {
      margin: 0;
      padding: 0;
    }
    html, body, #echarts-google-map {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }
  </style>

I wanted to change the size by changing the width and height values by this :

  <style type="text/css">
    * {
      margin: 0;
      padding: 0;
    }
    html, body, #echarts-google-map {
      width: 800px;
      height: 1200px;
      overflow: hidden;
    }
  </style>

it didn’t change anything... However if I add tooltip: {}, it works

  <style type="text/css">
    * {
      margin: 0;
      padding: 0;
    }
    #echarts-google-map {
      width: 800px;
      height: 1200px;
      overflow: hidden;
    }
  </style>
</head>
<body>
  <div id="echarts-google-map"></div>
  <!-- data is only for example -->
  <script type="text/javascript">
    var heatmapDataURI = 'https://fastly.jsdelivr.net/gh/apache/echarts-examples/public/data/asset/data/hangzhou-tracks.json';
    var option = {
      // google map component
      gmap: {
        // More initial options...
      },
      tooltip : {},
      visualMap: {
        // ...
      },

Do you think this is a bug or I’m not doing the right thing to change the map dimensions ?

Echarts not reflow

  • When used Gmap in a container, after Gmap is loaded and clicked full screen button ,the Canvas not reflow.
  • Canvas is not the same size as windows .

image

  • How I solved it in project.
<template>
 <div id='gMap'></div>
</template>
// Idle 
this.gmap = this.chart.getModel().getComponent('gmap').getGoogleMap()
this.gmap.addListener('idle', () => {
  const domGmstyle = document.getElementsByClassName('gm-style')[0] as HTMLDivElement
  const domGmwrap = document.getElementById('gMap') as HTMLDivElement
  if(domGmstyle.offsetHeight === window.innerHeight 
    && domGmstyle.offsetWidth === window.innerWidth
  ){ // Fullscreen
    domGmwrap.style.position = 'fixed'
    this.chart.resize()
  }
})

The echart/zrender canvas is not resized when Google Map goes fullscreen.

Hi !

I have an issue where the echart/zrender canvas onto which echart draw the points is not resized when Google Map goes fullscreen.
This lead to an issue where part of the points become "hidden" because they are outside the canvas, but they are still whithin the map boundaries where they should be drawn.
Here are some screenshots that might be more understandable:

1
When not in fullscreen, everything works as expected.

2
We can clearly see that the canvas cover the whole map.

But when we go fullscreen (using the google map fullscreen button) :
3

We clearly see that the canvas didn't change size (it gain a few pixel on the width but that's it), and only cover part of the map. This makes it so that the point are only visible on the part of the map that the canvas cover, and everything else is cutoff.

Is there anyway to fix this ?
I use the latest version (1.5.0) with echart-for-react.

brush selection

great library! can't get the traffic (and other Google layers) anywhere else.

Going deeper however, I found a problem - how to select(brush) series on the map without panning(roam). This has been fixed in ECharts geo maps somehow, see here. My guess is fixing it has to do with event.stopPropagation() and/or event.cancelBubble. When the selection(brush) is active, the mouse down/move event should not propagate further to the map.
Here is a demo

can not support graph?

在线示例中,将2处scatter改为graph后,显示不出来。
在本地代码中运行能看到产生错误。

echarts带的百度扩展可以正常使用graph,
请问有没有办法在google map中支持graph?(以及支持graph的force)

Lines problems

Hi.

Could you please give me a small example on how to use Line type with your extension?
I'm having some problems I think regarding series data format...

I keep getting the error:
"TypeError: Cannot read property 'dataToPoint' of null"

Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.