Hello,
I am looking for a way to render panel (eq. graph, just as in dashboard), inside the App plugin - couldn’t find any. Any pointers to possible solution are most welcome.
Hello @miroslavfoltyn64
If you would like to have panel as acomponent in your app,
this example may help you:
tooltipOptions,
};
const { asTable, isVisible, ...legendProps } = legendOptions;
return (
<>
<CreateBaselineButton data={data} timeRange={timeRange} timeZone={timeZone} panelOptions={options} onOptionsChange={onOptionsChange} />
<MLModelController data={data} timeRange={timeRange} timeZone={timeZone} panelOptions={options} onOptionsChange={onOptionsChange} />
<GraphPanelController data={data} timeZone={timeZone} options={options} onOptionsChange={onOptionsChange} onChangeTimeRange={onChangeTimeRange}>
{({ onSeriesToggle, onHorizontalRegionSelected, ...controllerApi }) => {
return (
<GraphWithLegend2
timeRange={timeRange}
timeZone={timeZone}
width={width}
height={height - 50} // TODO: -50 is to ajust graph height with CreateBaselineButton, need better calc
displayMode={asTable ? LegendDisplayMode.Table : LegendDisplayMode.List}
isLegendVisible={isVisible}
sortLegendBy={legendOptions.sortBy}
I have here an app with panel and datasource.
Regards,
V.