8/2/2023 0 Comments Maya create colorset![]() ![]() So your final code might look something like this: _this. Further, a column's dataItem will have a property/reference to its index, so we can use that with ColorSet's getIndex method to assign colors in sequence. When youre finished editing the submenu, close the. To get each column to have its own color, we can set that upon the column's first instantiation, i.e. -click on a space in the marking menu editor and select Popup Submenu. To set an individual column's color it would be something like: column.fill = lor("#2776BD") So even if you populate the chart's ColorSet, it's only each new series that will get a different color, not each column. Next, the column's color ( fill) by default is based on its series. Then I tried adding a color property to the dataProvider for each column but again it sets them all to have the first colour.įirst, if you want the chart to use only your colors, instead of appending to the default chart's ColorSet, you have to manually override it by assigning an array of Colors to (instead of pushing values to it). It sets all the columns to the first colour. $.each(_this._chartColours, function(index, item) ![]() I tried to use a theme, but that didn't work either: function am4themes_myTheme(target) The XY Chart and derivative charts section It renders the chart fine based on the dataprovider I create but it is not setting the colors. _this._chart.cursor = new am4charts.XYCursor() Var series = _this._(new am4charts.ColumnSeries()) I can see the 'correct' colors in the render view (I have no idea why his skin is so orange, that's not the color I picked, but that's another problem). His entire body and clothing is painted using Mesh Display > Apply Color. Var valueAxis = _this._(new am4charts.ValueAxis()) His head is painted 'white' via applied color, but flooded in 3D paint. Var categoryAxis = _this._(new am4charts.CategoryAxis()) Ĭ.location = 0 Ĭ = "category" Ĭ = 60 Ĭ = result.xAxisTitle $.each(result.chartDataMap, function(xAxis, yAxis) _this._chart = am4core.create(_this._tileChartDiv, am4charts.XYChart) I have the following code: _this._chartColours = I'm trying to add custom colours to a column chart, so each column has a different colour. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |