VEuPathDB / EdaNewIssues

0 stars 0 forks source link

SAM: client validation error for floating lineplot when there is no data #721

Closed bobular closed 1 month ago

bobular commented 8 months ago

Megastudy Filters: sample type = surveillance Floating line plot: Borreliella burgorferi prevalence vs collection start date

It looks like this should be handled better on the client with possible data API documentation update. Should also check other plot types.

Makes a big pink error

Unexpected backend type(s) encountered: Invalid value `null` supplied to min (type: number) of binSlider (type: { min: number, max: number, step: number }) of 1 (type: Partial<{ binSlider: { min: number, max: number, step: number }, binSpec: ({ type: "binWidth" | "numBins" } & Partial<{ value: number, units: "day" | "week" | "month" | "year", range: ({ min: number, max: number } | { min: string, max: string }) }>), viewport: { xMin: string, xMax: string } }>) of config (type: (({ variables: 

Back end response is pretty much empty:

{
    "lineplot": {
        "data": [
            {
                "seriesX": [],
                "seriesY": [],
                "binSampleSize": [],
                "errorBars": []
            }
        ],
        "config": {
            "variables": [
                {
                    "variableClass": "native",
                    "variableSpec": {
                        "variableId": "POPBIO_8000153",
                        "entityId": "OBI_0002728"
                    },
                    "plotReference": "yAxis",
                    "dataType": "integer",
                    "dataShape": "continuous",
                    "isCollection": false,
                    "imputeZero": false,
                    "hasStudyDependentVocabulary": false
                },
                {
                    "variableClass": "native",
                    "variableSpec": {
                        "variableId": "EUPATH_0043256",
                        "entityId": "OBI_0000659"
                    },
                    "plotReference": "xAxis",
                    "dataType": "date",
                    "dataShape": "continuous",
                    "isCollection": false,
                    "imputeZero": false,
                    "hasStudyDependentVocabulary": false
                }
            ],
            "viewport": {
                "xMin": "",
                "xMax": ""
            },
            "binSlider": {
                "min": null,
                "max": null,
                "step": null
            },
            "binSpec": {
                "type": "binWidth",
                "value": null
            }
        }
    }
}
aurreco-uga commented 1 month ago

currently (May 15 2024) this line plot is not allowed so closing issue.