Aug 17, 2020, 7:34 PM
[CLOSED] CartesianChart Bars Colors
Hello,
I want to change the colors of chart Bars, I have 3 columns:
- Red.
- Green.
- Yellow.
I tried this:
every where, with no luck to have correct color.
Kindly, advice.
I want to change the colors of chart Bars, I have 3 columns:
- Red.
- Green.
- Yellow.
I tried this:
<ext:Panel
runat="server"
Header="false"
ColumnWidth="0.30">
<Items>
<ext:CartesianChart
ID="EvalutionTypeChart"
ClientIDMode="Static"
Colors="#00ff00,#ff5d38,#fff881"
PaddingSpec="20 0 0 0"
MarginSpec="20 0 0 0"
Height="260"
Width="350"
runat="server">
<Store>
<ext:Store
ID="EvalutionTypeChartStore"
ClientIDMode="Static"
runat="server"
AutoDataBind="true">
<Model>
<ext:Model runat="server" ClientIDMode="Static" ID="EvalutionTypeChartStoreModel">
<Fields>
<ext:ModelField Name="EvalutionTypeTitle" />
<ext:ModelField Name="DoCount" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis
Position="Left"
Fields="DoCount"
Grid="true"
Title="المجموع"
Minimum="0">
<Renderer Handler="return Ext.util.Format.number(label, '0,0');" />
</ext:NumericAxis>
<ext:CategoryAxis Position="Bottom" Fields="EvalutionTypeTitle" Title="أنواع التقييم">
<Label RotationDegrees="0" />
</ext:CategoryAxis>
</Axes>
<Series>
<ext:BarSeries
Highlight="true"
XField="EvalutionTypeTitle"
Colors="#00ff00, #ff5d38, #fff881"
YField="DoCount">
<Tooltip runat="server" TrackMouse="true">
<Renderer Handler="toolTip.setTitle(record.get('EvalutionTypeTitle') + ': ' + record.get('DoCount'));" />
</Tooltip>
<Label
Display="InsideEnd"
Color="#00ff00"
Field="DoCount"
Orientation="Horizontal"
TextAlign="Center"
RotationDegrees="45">
<Renderer Handler="return Ext.util.Format.number(text, '0');" />
</Label>
</ext:BarSeries>
</Series>
</ext:CartesianChart>
</Items>
</ext:Panel>
I used
Colors="#00ff00,#ff5d38,#fff881"
Kindly, advice.
Last edited by fabricio.murta; Sep 08, 2020 at 9:31 PM.