Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split legends in case of vertically concatenated chart #1193

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion flexmeasures/ui/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@
}

async function embedAndLoad(chartSpecsPath, elementId, datasetName, previousResult, startDate, endDate) {
var combineLegend = 'true';

await vegaEmbed('#'+elementId, chartSpecsPath + 'dataset_name=' + datasetName + '&combine_legend='+ combineLegend + '&width=container&include_sensor_annotations=false&include_asset_annotations=false&chart_type=' + chartType, {{ chart_options | safe }})
.then(function (result) {
Expand Down Expand Up @@ -358,10 +357,14 @@
});
}

var combineLegend = 'true';
{% if active_page == "assets" %}
var dataPath = '/api/v3_0/assets/' + {{ asset.id }};
var dataDevPath = '/api/dev/asset/' + {{ asset.id }};
var datasetName = 'asset_' + {{ asset.id }};
{% if asset.sensors_to_show | length > 1 %}
Flix6x marked this conversation as resolved.
Show resolved Hide resolved
combineLegend = 'false';
{% endif %}
{% elif active_page == "sensors" %}
var dataPath = '/api/dev/sensor/' + {{ sensor.id }};
var dataDevPath = '/api/dev/sensor/' + {{ sensor.id }};
Expand Down
Loading