forked from iterative/dvc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plots: data conversion: adjust for viewer backend (iterative#8421)
* plots: vega: converter: support multi series data split and props inference Fixes: iterative#7754, iterative#8399 Related: iterative/studio#4369 * plots: converter: make converter infer x and y labels if not provided * plots: vega: converter: roll back to datapoints format * plots: vega: converter: refactor * plots: infer labels on * plots: get_plot_id: fix naming * plots: vega: converter: notes regarding converting
- Loading branch information
Showing
13 changed files
with
440 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
from typing import Dict, Optional | ||
from typing import Any, Dict, List, Optional, Tuple | ||
|
||
|
||
class Converter: | ||
def __init__(self, plot_properties: Optional[Dict] = None): | ||
self.plot_properties = plot_properties or {} | ||
def __init__( | ||
self, | ||
plot_id: str, | ||
data: Dict[str, Any] = None, | ||
properties: Optional[Dict] = None, | ||
): | ||
self.plot_id = plot_id | ||
self.properties = properties or {} | ||
self.data = data or {} | ||
|
||
def convert(self, data, revision: str, filename: str, **kwargs): | ||
def convert(self) -> Tuple[List[Tuple[str, str, Any]], Dict]: | ||
raise NotImplementedError | ||
|
||
def flat_datapoints(self, revision: str) -> Tuple[List[Dict], Dict]: | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.