我试图将<svg:circle>元素中fill属性的值绑定到color: string = "#cecece"我的组件中的变量.我之后读了很多文章并试过不同的方法,然而,没有人成功:
style="fill: {{color}}"
[style]="fill: color"
[style]="fill: 'color'"
[attr.style]="fill: color"
[attr.fill]="color"
[attr.style.fill]="color"
fill="{{color}}"
Run Code Online (Sandbox Code Playgroud)
有没有办法使这项工作?我甚至想到我在其他地方遇到问题的可能性.
它没有角度绑定通常的工作方式是:
<circle fill="#cecece"></circle>
我正在使用ng-bootstrap,我想在 svg 元素上添加弹出框或工具提示。我需要这个弹出窗口包含一个按钮和一些文本。
我尝试过的是这样的:
<ng-template #popContent>Book this seat <button>Book</button></ng-template>
<svg:circle [attr.id]="seat.id" class="seat tooltips" [attr.cx]="seat.x" [attr.cy]="seat.y" r="4" style="fill: rgb(206, 206, 206);" [ngbPopover]="popContent"></svg:circle>
Run Code Online (Sandbox Code Playgroud)
我还导入了库:
import { PopoverModule } from "../../../../node_modules/ngx-popover";
Run Code Online (Sandbox Code Playgroud)
我正在运行 bootstrap 4.0.0-alpha.6。
它不会显示,因为生成的弹出框被放置在 svg 内,而浏览器无法以这种方式呈现它。是否有一些可能的解决方法,我可以通过某种方式显示这些弹出窗口?
谢谢。
我正在尝试从粘合pyspark脚本内的s3存储桶中检索JSON文件。
我在aws胶内的作业中运行此功能:
def run(spark):
s3_bucket_path = 's3://bucket/data/file.gz'
df = spark.read.json(s3_bucket_path)
df.show()
Run Code Online (Sandbox Code Playgroud)
在此之后,我得到:AnalysisException:u'路径不存在:s3://bucket/data/file.gz;'
我搜索了此问题,但没有发现任何类似的东西可以推断出问题出在哪里。我认为访问存储分区可能存在权限问题,但是错误消息应该有所不同。