Kendo Angular Chart Legend Colors - kendo-ui-angular2

I have a Kendo for Angular column chart where we change the colors. The colors of the bars changed, but the Legend is still showing the default colors. Anybody know what Im missing?
https://stackblitz.com/edit/angular-8smzaw

The colours in the legend correspond to the colours of the series. Setting the colours of each column does not change the series. You need to remove the color settings and set the series instead.
Your template definitions should look something like this:
<kendo-chart [seriesColors]="['#4F81BD', '#C0504D']">
<kendo-chart-legend position="top"></kendo-chart-legend>
<kendo-chart-axis-defaults>
<kendo-chart-axis-defaults-labels format="c0"></kendo-chart-axis-defaults-labels>
</kendo-chart-axis-defaults>
<kendo-chart-tooltip format="{0:C}"></kendo-chart-tooltip>
<kendo-chart-series>
<kendo-chart-series-item
*ngFor="let item of detailSeries"
[data]="item.items" [name]="item.value"
field="value" categoryField="service"
type="column">
</kendo-chart-series-item>
</kendo-chart-series>
<kendo-chart-category-axis>
<kendo-chart-category-axis-item>
<kendo-chart-category-axis-item-labels [rotation]="-45"></kendo-chart-category-axis-item-labels>
</kendo-chart-category-axis-item>
</kendo-chart-category-axis>
</kendo-chart>

Related

EXCEL : two-bar, 2-axis histogram

I hope to show an two-bar, 2-axis histogram but when i do that on EXCEL I get an stacked, 2-axis histogram
The result I currently want is like that :
Rightclick the Chart select CHANGE CHART TYPE change chart type to CLUSTERED:

Changing the font color in VBA chart Series

I am using below code to color my pies in Pie chart so that each pie will have the same color of its value range. This code is working fine.
for I = 1 to UBound (vntValues)
myseries.Points(I).Interior.color = Range(s).cells(I).interior.color
next I
I want to change the font color of each pie according to the its value range. I tried below code but its not working.
myseries.Points(I).Font.color = Range(s).cells(I).Font.color
Its giving the error as
object doesn't support this property or method.
Can you please help me with the correct method to do it.
Thanks.
Semi-tested:
mySeries.Points(I).DataLabel.Characters.Font.Color = Range(s).cells(I).Font.color

angularchart.js stacked bar chart colors

I'm working with an elementary example of stacked bar chart. I would like to define a different color for every series (apple, banana, ...).
However when I try to set chart-colors=["#aaa","#bbb",...] I get random colors as result.
Here is my example:
http://plnkr.co/edit/NWKM85zV5wgwtHu17gtX?p=preview
After debuging the angular-chart.js I figured out that all the colors are converted to RGB representation in function hexToRgb(hex) and this function does not support short HEX format #FFF but rather long #FFFFFF
Following code worked well
chart-colors="['#ffffff', '#ff0000', '#00ff00', '#0000ff']"

How to create a text based Y axis on excel chart

I wish to customized the Y-axis to text instead on value.
Is there any way I can do it without any plugin?
Here will be my data:
A B C D
1 Lower Limit Upper Limit # Data
2 30S 40S A1234 30A
3 30S 40S A2345 30S
4 30S 40S A1256 30S
I wish my Y axis will be 30S, 30A, 40A, 40S intead of 10,20,30,40
and my X axis will be A1234,A2345,A1256
Is there any possible that I can change the X axis value?
I started with your data, and I added a small lookup table. I inserted a column "Value" (blue text) in your data range that has the Y value corresponding to the label in your "Data" column. You can use a lookup formula for this, for example, the formula in D2 is:
=INDEX($H$2:$H$5,MATCH(E2,$I$2:$I$5,0))
I made a column chart (don't know what type of chart you want, but this technique is widely applicable) using the yellow shaded range in the first data range (top left chart). I selected and copied the green shaded range in the second data range, selected the chart, and used Paste Special to add the data to the chart, using the settings shown in the dialog overlying the top right chart.
This has added another set of columns (bottom left chart), not so useful. I right-clicked the added series, picked Change Series Chart Type from the pop-up menu, and changed just this series to an XY scatter type (bottom right chart).
The XY scatter series is on the secondary axis, also not too useful. I formatted the XY series, and changed the axis to Primary (top left chart below). The 0.5 values in column G make the points line up with the vertical axis of the chart.
I added data labels to the XY series, shown in orange to distinguish them from the black axis labels (top right chart below). I formatted the labels so they appear to the left of the points, and so they used the Value from Cells option, based on the labels in I2:I5 (middle left chart below). If you don't have Excel 2013, you don't have this option, but you could
Manually type the desired text into the labels.
Link each label to the desired cell: select the labels (one click), select the desired label (second click), type = in the formula bar, select the cell, press Enter, repeat for all labels.
Use a third-party add-in like Rob Bovey's free Chart Labeler from appspro.com.
I hid the default axis labels. You can select None for axis labels, and then resize the plot area to make room for the custom labels created above. But I used a custom number format for the axis, which consisted of several space characters enclosed in double quotes. See middle right chart below.
Finally I rescaled the vertical axis so its min and max were 0 and 40 and the major spacing was 10, I formatted the XY series to use no markers, and I changed the label font color back to Automatic (bottom chart).

SSRS pie chart color coding

I have an ssrs report where I have many pie charts with the fields pass and fail as well as up to 3 other miscellaneous fields and I wish to be able to color the pass always green and the fail always red but the other fields could be a default value. Is this even possible to do? I have seen code examples with code for custom color in pie charts but I have no clue how to do this and have not found where I would put my custom code. What im trying to do is slightly different from what all those other examples do whith only defining a few fields.
=Switch
(
Fields!ResultTypeDescription.Value = "Pass", "Green",
Fields!ResultTypeDescription.Value = "Fail", "Red",
Fields!ResultTypeDescription.Value = "Assigned To Machine", "Blue",
Fields!ResultTypeDescription.Value = "Not Yet Assigned", "Orange",
True , "Gray"
)
In order to get our dynamic coloring working,i overrode the colors from the palette. This is how it’s done. Right-click on the pie and select Series Properties. Select the Fill page and click the Expression (fx) button to define the color.

Resources