We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当我拖动热力的范围图例,如果这个范围没有数据,则x、y轴都会变成undefined
https://g2.antv.antgroup.com/zh/examples/general/cell/#cell-aggregated
代码 /**
const chart = new Chart({ container: 'container', height: 300, });
const data = [ { "date": "2012-01-01T00:00:00.000Z", "precipitation": 0, "temp_max": 200, "temp_min": 5, "wind": 4.7, "weather": "drizzle" }, { "date": "2012-01-02T00:00:00.000Z", "precipitation": 10.9, "temp_max": 10, "temp_min": 2.8, "wind": 4.5, "weather": "rain" }, { "date": "2012-01-03T00:00:00.000Z", "precipitation": 0.8, "temp_max": 2, "temp_min": 7.2, "wind": 2.3, "weather": "rain" }, { "date": "2012-01-05T00:00:00.000Z", "precipitation": 1.3, "temp_max": 8.9, "temp_min": 2.8, "wind": 6.1, "weather": "rain" }, { "date": "2012-01-06T00:00:00.000Z", "precipitation": 2.5, "temp_max": 4.4, "temp_min": 2.2, "wind": 2.2, "weather": "rain" }, { "date": "2012-01-07T00:00:00.000Z", "precipitation": 0, "temp_max": 7.2, "temp_min": 2.8, "wind": 2.3, "weather": "rain" }, { "date": "2012-01-08T00:00:00.000Z", "precipitation": 0, "temp_max": 10, "temp_min": 2.8, "wind": 2, "weather": "sun" }, ]
chart .cell() .data(data) // .transform({ type: 'group', color: 'max' }) .encode('x', 'date') .encode('y', 'weather') .encode('color', 'temp_max') .slider('x') .slider('y') .style('inset', 0.5) .scale('color', { palette: 'gnBu' }) .animate('enter', { type: 'fadeIn' });
chart.render();
预期不应该是undefined,可以为空或者 0
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
当我拖动热力的范围图例,如果这个范围没有数据,则x、y轴都会变成undefined
重现链接
https://g2.antv.antgroup.com/zh/examples/general/cell/#cell-aggregated
重现步骤
代码
/**
*/
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
height: 300,
});
const data = [
{
"date": "2012-01-01T00:00:00.000Z",
"precipitation": 0,
"temp_max": 200,
"temp_min": 5,
"wind": 4.7,
"weather": "drizzle"
},
{
"date": "2012-01-02T00:00:00.000Z",
"precipitation": 10.9,
"temp_max": 10,
"temp_min": 2.8,
"wind": 4.5,
"weather": "rain"
},
{
"date": "2012-01-03T00:00:00.000Z",
"precipitation": 0.8,
"temp_max": 2,
"temp_min": 7.2,
"wind": 2.3,
"weather": "rain"
},
{
"date": "2012-01-05T00:00:00.000Z",
"precipitation": 1.3,
"temp_max": 8.9,
"temp_min": 2.8,
"wind": 6.1,
"weather": "rain"
},
{
"date": "2012-01-06T00:00:00.000Z",
"precipitation": 2.5,
"temp_max": 4.4,
"temp_min": 2.2,
"wind": 2.2,
"weather": "rain"
},
{
"date": "2012-01-07T00:00:00.000Z",
"precipitation": 0,
"temp_max": 7.2,
"temp_min": 2.8,
"wind": 2.3,
"weather": "rain"
},
{
"date": "2012-01-08T00:00:00.000Z",
"precipitation": 0,
"temp_max": 10,
"temp_min": 2.8,
"wind": 2,
"weather": "sun"
},
]
chart
.cell()
.data(data)
// .transform({ type: 'group', color: 'max' })
.encode('x', 'date')
.encode('y', 'weather')
.encode('color', 'temp_max')
.slider('x')
.slider('y')
.style('inset', 0.5)
.scale('color', { palette: 'gnBu' })
.animate('enter', { type: 'fadeIn' });
chart.render();
预期行为
预期不应该是undefined,可以为空或者 0
平台
屏幕截图或视频(可选)
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: