此查询可以创建事件但不创建表格!
function updateGraph(nested, selectValue) {
// Get the selected dataset
var filtered = nested.filter( function(d) { return d.key == selectValue; });
g.selectAll("#datapoints")
.data(filtered[0].values)
.enter().append("g")
.each(function(d, i) { // So that multiple series can be included on the same graph
var min = d3.min(d.values, function(d) { return d.value; } );
var max = d3.max(d.values, function(d) { return d.value; } );
// Join new data with old elements
var points = d3.select(this).selectAll("circle")
.data(d.values, function(d) { return (d.Plot); } );
// Add new elements
points.enter().append("circle")
.attr("cy", y(d.key))
.attr("r", 10)
.style("opacity", 0.5)
.style("fill", function(d) { return elevColor(d.Elevation); })
.merge(points)
.transition()
.attr("cx", function(d) { return x((d.value-min)/(max-min)); });
// Remove old elements not present in new data (doesn't do anything)
points.exit().remove();
});
}
任何想法?
答案 0 :(得分:0)
您的活动安排程序是正确的。首先检查它的状态
SHOW VARIABLES LIKE 'event_scheduler'
默认情况下,事件计划程序状态已设置为DISABLED。要启用事件计划程序:
SET GLOBAL event_scheduler = ON;