0.2.3 • Published 1 year ago

@vasichmen/vue-heatmap v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vue-heatmap

VueJs 2 component for heatmap visualization. Wrapper for heatmapjs library. Project with an example of use

Example

<template>
  <vue-heatmap
      :point-data="heatmapData"
      :point-radius="30"
  >
    <template #default>
      <div
          class="map"
          style="height:300px; width:300px"
      >
      </div>
    </template>
  </vue-heatmap>
</template>

<script>
export default {
  data: () => {
    return {
      heatmapData: {
        data: [
          {
            x: 100,
            y: 100,
            value: 50,
          },
          {
            x: 150,
            y: 150,
            value: 80,
          },
          {
            x: 200,
            y: 200,
            value: 20,
          },
          {
            x: 200,
            y: 100,
            value: 100,
          },
        ],
        max: 100,
        min: 10,
      },
    };
  },
};

</script>

Props

nametypedefaultdescription
point-dataobjectheatmap data to visualize
point-radiusnumber9capture radius of a single point
max-opacitynumber0.20 .. 1
min-opacitynumber00 .. 1
blurnumber0.90 .. 1, the degree of blurring of point boundaries
gradientobject{0.25: 'rgb(0,0,255)', 0.55: 'rgb(0,255,0)',0.85: 'yellow',1.0: 'rgb(255,0,0)',}heatmap gradient parameters
x-fieldstringxfield name of point-data.data array object for x coordinate
y-fieldstringyfield name of point-data.data array object for y coordinate
value-fieldstringvaluefield name of point-data.data array object for value
is-visiblebooleantruedetermines if heatmap is visible
0.2.3

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago