Coloring a table in apache superset - apache-superset

I want to color the background bars (or the entire cells) of the table as shown in the appended screenshot based on the "Group-By"/dimension value (red for "rot", yellow for "gelb" and green for "grĂ¼n").
I was able to color the metric-part of other visualizations with label_colors, but I have not yet found a way to color the cells of the table based on a "dimension".
Is there a way to do this?
As of now:
EDIT: I wanted to color it the following way (edited with paint):

This is a tad hacky, but you can add a markdown component and add the following markup:
<style>
th {
color: red; /* or whatever color/hex code you want */
}
</style>
The markdown component will be blank after you add this--i.e. there will just be a blank markdown block-- so you may want to add some copy. Alternatively, if you already have a markdown block, you can add it there, and it won't appear as long as you remember the <style></style> tags.

Related

Apex Charts line color not set correctly

When creating a chart in 'react-apexcharts' it is my understanding that colors should be inherited. However, when creating multiple series with a colors array the legend is set but not the line color.
Codepen demonstration here.
https://codesandbox.io/embed/react-charts-demo-325oh
Instead of color names, try hex color codes.
options: {
colors: ["#008000", "#FF0000"]
}
Color names are supported at some places in ApexCharts, but not all.
use the fill property or colors under options.
Link: https://apexcharts.com/docs/options/fill/#colors
code snippet example:
const options = {
colors: ["#E27483", "#F8C300"]
}

How can I change the color of inside borders only for header columns?

I want to have output a table into RTF that has no lines inside the table but has the inside border in header cells. In addition, the header column is colorful. I know how to change the border color for all the cells but I can't figure out how to only change the header ones. I need to do it with proc template. Right now I get this table:
But I need to have it like this:
The code is :
proc template;
define style styles.new;
parent = Styles.Printer;
replace color_list /
'link' = blue
'bgH' = cxFF8200
'bgT' = white
'bgD' = white
'fg' = black
'bg' = white;
replace Table from Output /
frame = hsides
rules = groups
cellpadding = 2pt
cellspacing = 0.25pt
borderwidth = 0.75pt
background = color_list('bgt') ;
end;
run;
ods listing style=new;
Could someone tell me please how could I change the code to get the correct output?
Thank you!
The white column header separation 'lines' you are seeing are not actually drawn.
Change to cellspacing=1in and you will observe that the 'lines' are actually artifacts of the spacing and correspond to the overall background. I don't think there is an easy way to have header cell borders that are different than data cell borders.

Google Chart - Bar chart with label underneath

I'm trying to create something close to this using Google Chart API:
So far, I've got this:
<img src="//chart.googleapis.com/chart?
chbh=a
&chs=461x337
&cht=bvg
&chco=323232,7bc247&c
&chd=e:zM,Mz" width="461" height="337" alt="" />
Which generates this
http://jsfiddle.net/alexjamesbrown/c2VAP/
Which is almost there, but I can't figure out how / if I can add a label underneath the bars?
If you want to get labels like that, you have to make a few changes. Set the following chart parameters:
cht=bvs // create a stacked chart
chd=zM__,__Mz // insert null values for the opposite data points
chxt=x // create an x-axis
hxl=0:|Label+1|Label+2 // set the labels on the x-axis ("+" translates to a space)
see example: http://jsfiddle.net/asgallant/c2VAP/2/

Different color for table of contents entry and page numbers

I am generating a clickable (=with links) table of contents. In order to emphasize the 'clickability' of the entries I want them colored as links (i.e. blue color and underline).
I have this code for setting the style:
toc = TableOfContents()
toc.levelStyles[0].fontName = 'Arial Bold'
toc.levelStyles[0].fontSize = 12
toc.levelStyles[0].textColor = '#0000cc'
and use this code to add each entry:
toc.addEntry(0, '<u>' + entrytext + '</u>', pageNum, str(id(page)))
It works ok, the problem is that page numbers turn out blue as well. I tried to look around SO and the user guide for ways to put a different style for each - but was unsuccessful. Any ideas?
Thanks.

MSChart HowTo Create a Second CursorX to have multiple Cursor by a second Transparant ChartArea?

I am try to introduce a Second CursorX at AxisX Primary if this is possible some how?
I did try to activate a second CursorX at Secondary but that one did not work as expected,
I also readed about Line Annotation and Vertical Line Annotation and created some kind of line but a Second set of CursorX CursorY would be far nicer
I did try to create and as much as empty as possible and Transparant Second ChartArea which i try to overlay on top of the ChartArea1, i noticed InnerPlotPosition and Postion of both ChartArea should stay in track to get a full aligned Overlay, and next the CursorX of second ChartArea should be displayed on top of ChartArea1
This is what i think how it could be done but don't have a clue if it sounda for a good way to create a second CursorX maybe Line Annotation is an easier road to rome
Any help suggestion are welcome
Thanks in advance
Suppose your chart contains multiple chart areas aligned vertically, below code allows you set CursorX in each chart area:
Dim c1 As New Chart
'...here code block to build each chart area ...
'...then use below sample code to align each chart area vertically:
'c1.ChartAreas(i).AlignmentOrientation = AreaAlignmentOrientations.Vertical
'c1.ChartAreas(i).AlignWithChartArea = c1.ChartAreas(0).Name
'below set horizontal cursor (it is a gold vertical bar in each chart area):
For Each area As ChartArea In c1.ChartAreas
area.CursorX.LineColor = Color.Gold
area.CursorX.LineWidth = 3
area.CursorX.IsUserEnabled = True
area.CursorX.IsUserSelectionEnabled = True
area.CursorX.SelectionColor = System.Drawing.Color.PaleGoldenrod
Next