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

时间轴横坐标错位 #1019

Closed
jinliming2 opened this issue Nov 12, 2019 · 1 comment
Closed

时间轴横坐标错位 #1019

jinliming2 opened this issue Nov 12, 2019 · 1 comment

Comments

@jinliming2
Copy link

image

import React from "react";
import {
  Chart,
  Geom,
  Axis,
  Tooltip,
} from "bizcharts";

class Gradient extends React.Component {
  render() {
    const data = [
      {
        month: "2015-01-01T00:00:00Z",
        acc: 84.0
      },
      {
        month: "2015-01-02T00:00:00Z",
        acc: 14.9
      },
      {
        month: "2015-01-03T00:00:00Z",
        acc: 17.0
      },
      {
        month: "2015-01-04T00:00:00Z",
        acc: 20.2
      },
      {
        month: "2015-01-05T00:00:00Z",
        acc: 55.6
      },
    ];
    const cols = {
      month: {
        type: 'time',
      },
    };
    return (
      <div>
        <Chart height={400} data={data} scale={cols} forceFit>
          <Axis name="month" />
          <Tooltip />
          <Geom type="line" position="month*acc" />
        </Chart>
      </div>
    );
  }
}

ReactDOM.render(<Gradient />, mountNode)
@jinliming2
Copy link
Author

哦。。。时区问题。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant