Colors in Gantt Chart Perspective

Hi Ignition Community,

I have configured an XY chart to function as a Gantt chart, following the guidelines provided in the manual. However, I am encountering an issue where all the blocks in the Gantt chart appear to be the same color.

I would appreciate any assistance in resolving this color configuration problem.

Thank you!


Here's the json of the chart,

[
  {
    "type": "ia.chart.xy",
    "version": 0,
    "props": {
      "legend": {
        "enabled": false
      },
      "cursor": {
        "enabled": false,
        "series": "mySeries",
        "lineX": {
          "enabled": false
        },
        "lineY": {
          "enabled": false
        }
      },
      "scrollBars": {
        "horizontal": {
          "enabled": false,
          "series": "mySeries"
        },
        "vertical": {
          "enabled": false
        }
      },
      "xAxes": [
        {
          "name": "time",
          "label": {
            "enabled": true,
            "text": "Time",
            "color": ""
          },
          "visible": true,
          "tooltip": {
            "enabled": true,
            "text": "",
            "cornerRadius": 3,
            "pointerLength": 4,
            "background": {
              "color": "",
              "opacity": 1
            }
          },
          "inversed": false,
          "render": "date",
          "category": {
            "break": {
              "enabled": false,
              "startCategory": "",
              "endCategory": "",
              "size": 0.05
            }
          },
          "date": {
            "baseInterval": {
              "enabled": false,
              "timeUnit": "hour",
              "count": 1,
              "skipEmptyPeriods": false
            },
            "range": {
              "max": "",
              "min": "",
              "useStrict": false
            },
            "break": {
              "enabled": false,
              "startDate": "",
              "endDate": "",
              "size": 0.05
            },
            "inputFormat": "yyyy-MM-dd kk:mm:ss",
            "format": "M/d/yyyy"
          },
          "value": {
            "range": {
              "max": "",
              "min": "",
              "useStrict": false
            },
            "logarithmic": false,
            "break": {
              "enabled": false,
              "startValue": 0,
              "endValue": 100,
              "size": 0.05
            },
            "format": "#,###.##"
          },
          "appearance": {
            "opposite": false,
            "inside": false,
            "labels": {
              "color": "",
              "opacity": 1,
              "rotation": 0,
              "verticalCenter": "middle",
              "horizontalCenter": "middle"
            },
            "grid": {
              "color": "",
              "opacity": 1,
              "dashArray": "",
              "minDistance": 60,
              "position": 0.5
            },
            "font": {
              "size": "",
              "weight": 500
            }
          }
        }
      ],
      "yAxes": [
        {
          "name": "Operator",
          "label": {
            "enabled": false,
            "text": "Process Temp",
            "color": ""
          },
          "visible": true,
          "tooltip": {
            "enabled": true,
            "text": "",
            "cornerRadius": 3,
            "pointerLength": 4,
            "background": {
              "color": "",
              "opacity": 1
            }
          },
          "inversed": false,
          "render": "category",
          "category": {
            "break": {
              "enabled": false,
              "startCategory": "",
              "endCategory": "",
              "size": 0.05
            }
          },
          "date": {
            "baseInterval": {
              "enabled": false,
              "timeUnit": "hour",
              "count": 1,
              "skipEmptyPeriods": false
            },
            "range": {
              "max": "",
              "min": "",
              "useStrict": false
            },
            "break": {
              "enabled": false,
              "startDate": "",
              "endDate": "",
              "size": 0.05
            },
            "inputFormat": "yyyy-MM-dd kk:mm:ss",
            "format": "M/d/yyyy HH:mm:ss"
          },
          "value": {
            "range": {
              "max": "",
              "min": "",
              "useStrict": false
            },
            "logarithmic": false,
            "break": {
              "enabled": false,
              "startValue": 0,
              "endValue": 100,
              "size": 0.05
            },
            "format": "#,###.##"
          },
          "appearance": {
            "opposite": false,
            "inside": false,
            "labels": {
              "color": "",
              "opacity": 1,
              "rotation": 0,
              "verticalCenter": "middle",
              "horizontalCenter": "middle"
            },
            "grid": {
              "color": "",
              "opacity": 1,
              "dashArray": "",
              "minDistance": null,
              "position": 0
            },
            "font": {
              "size": "",
              "weight": 500
            }
          }
        }
      ],
      "series": [
        {
          "name": "mySeries",
          "label": {
            "text": "Process Temp"
          },
          "visible": true,
          "hiddenInLegend": false,
          "defaultState": {
            "visible": true
          },
          "data": {
            "source": "example",
            "x": "toDate",
            "y": "name"
          },
          "xAxis": "time",
          "yAxis": "Operator",
          "zIndex": 0,
          "tooltip": {
            "enabled": true,
            "text": "{name}: [bold]{fromDate} - {toDate}[/]",
            "cornerRadius": 3,
            "pointerLength": 4,
            "background": {
              "color": "",
              "opacity": 1
            }
          },
          "render": "column",
          "candlestick": {
            "open": {
              "x": "",
              "y": ""
            },
            "high": {
              "x": "",
              "y": ""
            },
            "low": {
              "x": "",
              "y": ""
            },
            "appearance": {
              "fill": {
                "color": "",
                "opacity": 1
              },
              "stroke": {
                "color": "",
                "opacity": 1,
                "width": 1
              },
              "stacked": false,
              "deriveFieldsFromData": {
                "fill": {
                  "color": "",
                  "opacity": ""
                },
                "stroke": {
                  "color": "",
                  "opacity": "",
                  "width": ""
                }
              },
              "heatRules": {
                "enabled": false,
                "max": "",
                "min": "",
                "dataField": ""
              }
            }
          },
          "column": {
            "open": {
              "x": "fromDate",
              "y": ""
            },
            "appearance": {
              "fill": {
                "color": "",
                "opacity": 1
              },
              "stroke": {
                "color": "",
                "opacity": 1,
                "width": 1
              },
              "stacked": false,
              "width": null,
              "height": null,
              "deriveFieldsFromData": {
                "fill": {
                  "color": "color",
                  "opacity": ""
                },
                "stroke": {
                  "color": "",
                  "opacity": "",
                  "width": ""
                }
              },
              "heatRules": {
                "enabled": false,
                "max": "",
                "min": "",
                "dataField": ""
              }
            }
          },
          "line": {
            "open": {
              "x": "",
              "y": ""
            },
            "appearance": {
              "connect": true,
              "tensionX": 1,
              "tensionY": 1,
              "minDistance": 0.5,
              "stroke": {
                "width": 3,
                "opacity": 1,
                "color": "",
                "dashArray": ""
              },
              "fill": {
                "opacity": 0,
                "color": ""
              },
              "bullets": [
                {
                  "enabled": false,
                  "render": "circle",
                  "width": 10,
                  "height": 10,
                  "label": {
                    "text": "{value}",
                    "position": {
                      "dx": 0,
                      "dy": 0
                    }
                  },
                  "fill": {
                    "color": "",
                    "opacity": 1
                  },
                  "stroke": {
                    "color": "",
                    "opacity": 1,
                    "width": 1
                  },
                  "rotation": 0,
                  "tooltip": {
                    "enabled": true,
                    "text": "{name}: [bold]{valueY}[/]",
                    "cornerRadius": 3,
                    "pointerLength": 4,
                    "background": {
                      "color": "",
                      "opacity": 1
                    }
                  },
                  "deriveFieldsFromData": {
                    "fill": {
                      "color": "",
                      "opacity": ""
                    },
                    "stroke": {
                      "color": "",
                      "opacity": "",
                      "width": ""
                    },
                    "rotation": ""
                  },
                  "heatRules": {
                    "enabled": false,
                    "max": 100,
                    "min": 2,
                    "dataField": ""
                  }
                }
              ]
            }
          },
          "stepLine": {
            "open": {
              "x": "",
              "y": ""
            },
            "appearance": {
              "connect": true,
              "tensionX": 1,
              "tensionY": 1,
              "minDistance": 0.5,
              "stroke": {
                "width": 3,
                "opacity": 1,
                "color": "",
                "dashArray": ""
              },
              "fill": {
                "opacity": 0,
                "color": ""
              },
              "bullets": [
                {
                  "enabled": true,
                  "render": "circle",
                  "width": 10,
                  "height": 10,
                  "label": {
                    "text": "{value}",
                    "position": {
                      "dx": 0,
                      "dy": 0
                    }
                  },
                  "fill": {
                    "color": "",
                    "opacity": 1
                  },
                  "stroke": {
                    "color": "",
                    "opacity": 1,
                    "width": 1
                  },
                  "rotation": 0,
                  "tooltip": {
                    "enabled": true,
                    "text": "{name}: [bold]{valueY}[/]",
                    "cornerRadius": 3,
                    "pointerLength": 4,
                    "background": {
                      "color": "",
                      "opacity": 1
                    }
                  },
                  "deriveFieldsFromData": {
                    "fill": {
                      "color": "",
                      "opacity": ""
                    },
                    "stroke": {
                      "color": "",
                      "opacity": "",
                      "width": ""
                    },
                    "rotation": ""
                  },
                  "heatRules": {
                    "enabled": false,
                    "max": 100,
                    "min": 2,
                    "dataField": ""
                  }
                }
              ]
            }
          }
        }
      ],
      "dataSources": {}
    },
    "meta": {
      "name": "XYChart_3"
    },
    "position": {},
    "custom": {},
    "propConfig": {
      "props.dataSources.example": {
        "binding": {
          "type": "query",
          "config": {
            "returnFormat": "json",
            "queryPath": "Axcend/ScheduleShifts/getShiftTemplateDataWithColor",
            "parameters": {
              "templateID": "26"
            }
          }
        }
      }
    }
  }
]type or paste code here

Here's the data which im using,

{
  "example": [
    {
      "fromDate": "1899-12-30 07:00:00",
      "toDate": "1899-12-30 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1899-12-30 19:00:00",
      "toDate": "1899-12-30 07:00:00",
      "color": "#000080",
      "name": "Shift"
    },
    {
      "fromDate": "1899-12-31 07:00:00",
      "toDate": "1899-12-31 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1899-12-31 19:00:00",
      "toDate": "1899-12-31 07:00:00",
      "color": "#000080",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-01 07:00:00",
      "toDate": "1900-01-01 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-01 19:00:00",
      "toDate": "1900-01-01 07:00:00",
      "color": "#000080",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-02 07:00:00",
      "toDate": "1900-01-02 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-02 19:00:00",
      "toDate": "1900-01-02 07:00:00",
      "color": "#000080",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-03 07:00:00",
      "toDate": "1900-01-03 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-03 19:00:00",
      "toDate": "1900-01-03 07:00:00",
      "color": "#000080",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-04 07:00:00",
      "toDate": "1900-01-04 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-04 19:00:00",
      "toDate": "1900-01-04 07:00:00",
      "color": "#000080",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-05 07:00:00",
      "toDate": "1900-01-05 19:00:00",
      "color": "#00FFFF",
      "name": "Shift"
    },
    {
      "fromDate": "1900-01-05 19:00:00",
      "toDate": "1900-01-05 07:00:00",
      "color": "#000080",
      "name": "Shift"
    }
  ]
}

That's not a problem; that's by design.
All your data is charted as one series and a series has consistent properties such as color. If you want different colors you need to split the data into separate series.