Skip to content

Commit

Permalink
Move plot_ prefix to vega.
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Jun 15, 2022
1 parent d00b696 commit 619be98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/dvc_render/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def generate_html(self, html_path=None) -> str:
if partial:

div_id = self.remove_special_chars(self.name)
div_id = f"plot_{div_id}"

return self.DIV.format(id=div_id, partial=partial)
return ""
Expand Down
2 changes: 2 additions & 0 deletions src/dvc_render/vega.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class VegaRenderer(Renderer):
EXTENSIONS = {".yml", ".yaml", ".json", ".csv", ".tsv"}

def __init__(self, datapoints: List, name: str, **properties):
if name and not name.startswith("plot_"):
name = f"plot_{name}"
super().__init__(datapoints, name, **properties)
self.template = get_template(
self.properties.get("template", None),
Expand Down

0 comments on commit 619be98

Please sign in to comment.