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

Use dateTime on Scatter XAxis? #120

Open
wilsonmaf opened this issue Apr 11, 2023 · 1 comment
Open

Use dateTime on Scatter XAxis? #120

wilsonmaf opened this issue Apr 11, 2023 · 1 comment

Comments

@wilsonmaf
Copy link

Can we use DateTime as the XAxis to plot scatter graphs?
Demos only show numeric values on both Y and XAxis.

@superjerry88
Copy link
Collaborator

image

{
    "ts_code": "000001.SH",
    "trade_date": "2020-03-13",
    "close": 2887.4265,
    "open": 2804.2322,
    "high": 2910.8812,
    "low": 2799.9841,
    "vol": 366450436,
    "amount": 393019665.2
  },
  {
    "ts_code": "000001.SH",
    "trade_date": "2020-03-12",
    "close": 2923.4856,
    "open": 2936.0163,
    "high": 2944.4651,
    "low": 2906.2838,
    "vol": 307778457,
    "amount": 328209202.4
  },
  {
    "ts_code": "000001.SH",
    "trade_date": "2020-03-11",
    "close": 2968.5174,
    "open": 3001.7616,
    "high": 3010.0286,
    "low": 2968.5174,
    "vol": 352470970,
    "amount": 378766619
  }
  . . .
ScatterConfig config1 = new ScatterConfig()
      {
          XField = "trade_date",
          YField = "amount",
          Shape = "circle",
          Size = 4,
          ...

yes you can , just change the XField to your datetime variable

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

2 participants