mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-04 11:25:52 +08:00
Add null check in GenericVisualization
This commit is contained in:
parent
caeeec803e
commit
52b7d38df8
@ -18,6 +18,7 @@ const { Option } = Select;
|
|||||||
|
|
||||||
const DateTimeWrapper = styled.div`
|
const DateTimeWrapper = styled.div`
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
justify-content: flex-end !important;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
interface DateTimeSelectorProps extends RouteComponentProps<any> {
|
interface DateTimeSelectorProps extends RouteComponentProps<any> {
|
||||||
|
@ -15,10 +15,10 @@ interface GenericVisualizationsProps {
|
|||||||
|
|
||||||
const GenericVisualizations = (props: GenericVisualizationsProps) => {
|
const GenericVisualizations = (props: GenericVisualizationsProps) => {
|
||||||
const data = {
|
const data = {
|
||||||
labels: props.data !== undefined && props.data.map((s) => new Date(s.timestamp / 1000000)),
|
labels: (props.data !== undefined && props.data !== null) && props.data.map((s) => new Date(s.timestamp / 1000000)),
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
data: props.data.map((s) => s.value),
|
data: (props.data !== undefined && props.data !== null) && props.data.map((s) => s.value),
|
||||||
borderColor: "rgba(250,174,50,1)", // for line chart
|
borderColor: "rgba(250,174,50,1)", // for line chart
|
||||||
backgroundColor: props.chartType === "bar" ? "rgba(250,174,50,1)" : "", // for bar chart, don't assign backgroundcolor if its not a bar chart, may be relevant for area graph though
|
backgroundColor: props.chartType === "bar" ? "rgba(250,174,50,1)" : "", // for bar chart, don't assign backgroundcolor if its not a bar chart, may be relevant for area graph though
|
||||||
},
|
},
|
||||||
|
@ -47,7 +47,6 @@ const _TraceFilter = (props: TraceFilterProps) => {
|
|||||||
const urlParams = new URLSearchParams(location.search.split("?")[1]);
|
const urlParams = new URLSearchParams(location.search.split("?")[1]);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
console.log("Mera")
|
|
||||||
handleApplyFilterForm({
|
handleApplyFilterForm({
|
||||||
service: "",
|
service: "",
|
||||||
tags: [],
|
tags: [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user