这是我第一次尝试 d3.js,我在使用 d3-tip 函数时遇到了一些小问题。一张图片胜过一千个字,所以这是我的问题。

d3-tips 工作正常,直到我将图表放入模态中。我尝试过将 css z-index 作为 d3-tip 样式的一部分:
.d3-tip {
line-height: 1;
font-weight: bold;
padding: 12px;
background: rgba(0, 0, 0, 0.8);
color: #fff;
border-radius: 2px;
z-index: 1;
}
Run Code Online (Sandbox Code Playgroud)
这没有任何效果,并且以我有限的 CSS 知识,我认为 z-index 仍然使用我的主体作为关系键。
这是我的var tip设置:
var tip = d3.tip()
.attr('class', 'd3-tip')
.offset([-10, 0])
.html(function(d) {
return "<strong>Date:</strong> <span style='color:red'>" + d.date + "</span></br><strong>Time:</strong> <span style='color:red'>" + d.time + "</span>
</br><strong>Around:</strong> <span style='color:red'>" + d.timeGroup + "</span>";
});
Run Code Online (Sandbox Code Playgroud)
这是我的模式:
<div id="modal-barGraph" class="modal flex-child fade" role='dialog'>
<div …Run Code Online (Sandbox Code Playgroud) 当我在我的git仓库中运行AWSDevTools的设置时,我收到以下错误.
[[: not found
cp: cannot stat/home/user/aws/.git/scripts':没有这样的文件或目录`
我将脚本文件夹从AWSDevTools .zip直接复制到git repo,然后收到此错误:
[[: not found
cp: cannot create directory.git/AWSDevTools':没有这样的文件或目录`
将AWSDevTools从.zip复制到存储库,并认为安装程序只是希望repo中的这些文件夹运行,但我继续收到相同的目录错误.任何帮助都会很棒.
我在使用update_batch发布时收到此错误.我已经看到了其他帖子,但我的行引用是DB_active_rec.php文件,其他人在他们的MC中看到它.该错误不会阻止update_batch发布,它会返回每个$ rb_items的错误.

控制器:
public function update_rb(){
$rb_items = array();
$rb_id=$this->input->post('id', TRUE);
$rb_brand=$this->input->post('brand', TRUE);
$rb_tasted=$this->input->post('tasted', TRUE);
$rb_rating=$this->input->post('rating', TRUE);
$rb_comment=$this->input->post('comment', TRUE);
$i=0;
foreach($rb_id as $id){
$rb_items[$i] = array(
'id'=>$id,
'brand'=>$rb_brand[$i],
'rating'=>$rb_rating[$i],
'comment'=>$rb_comment[$i]
);
if(empty($rb_tasted)){
$rb_items[$i]['tasted']=0;
} else if
(in_array($id,$rb_tasted)){
$rb_items[$i]['tasted']=1;
} else{
$rb_items[$i]['tasted']=0;
}
$i++;
}
$this->model->update_rb($rb_items);
}
Run Code Online (Sandbox Code Playgroud)
模型:
public function update_rb($rb_items){
$this->rb_db->update_batch('rb_selection',$rb_items,'id');
}
Run Code Online (Sandbox Code Playgroud)
视图:
<tr>
<input type="hidden" name="id[]" value="<?php echo $row['id'];?>">
<input type="hidden" name="brand[]" value="<?php echo $row['brand'];?>">
<td><?php echo "<p>".$row['brand']."</p>";?></td>
<td><input type="checkbox" <?php if($row['tasted'] == 1){echo "checked = checked";}?> name="tasted[]" value="<?php …Run Code Online (Sandbox Code Playgroud)