Change color of distribution plot in qlik sense - qlikview

I have a distribution plot in qlik sense:
How can I specify the color of the dots? I want to change it based on the points.
I have three different types of my x-axis 'Geschäftsverteilung' : 'On-Time', 'Delayed' and 'Late', so the on-time are red right now and should be green, the delayed are blue and should be yellow and the late ones are yellow and should be red.

You need to set to change colors by expression something like that:
If(Sum([# Purchases]) > 6,Green(),Red())
To provide exact answer I would need to see your file and know what exactly you want to achieve (what colors for what results)

Related

What is the scope of a path in a PDF text object?

I am confused by seemingly contradicting information in the PDF Standard (PDF 32000-1:2008).
To simplify, I assume no transparency complications at all, as I am confused enough as is, so alphas are all 1, and I have blending mode normal, and text knockout is not a topic.
The issue is text state (more precisely Tr, setting the text rendering mode) and text showing (Tj and friends) and how to reconcile these with the scope of what a SINGLE path is.
So these three things, A, B, and C, seem contradictory:
A. On p.247 (in section 9.3.6, under Table 106), it says (emphasis with caps is mine): "At the end of the text object, the accumulated glyph outlines, if any, shall be combined INTO A SINGLE PATH, treating the individual outlines as subpaths of that path and applying the nonzero winding number rule (...)."
B. According to p.113, Figure 9 ("Graphics Objects"), the allowed operators within a text object include: "Color" (e.g. a change of fill color), "Text state" (so e.g. changing Tr, the text rendering mode), and "Text-showing" (e.g. (Hello) Tj).
According to B, the following would then be a valid text object:
C. On p. 246, in the middle of the page it says (emphasis in caps is mine): "In [text rendering] modes that perform both filling and stroking, the effect shall be as if each glyph outline where filled and then stroked in separate operations. If any of the glyphs overlap, the result shall be equivalent to filling and stroking them ONE AT A TIME, producing the appearance of stacked opaque glyphs, rather then first filling and stroking them all at once".
So, according to A, all the glyphs (in my example in B) in "Red hello filled" and "Blue hello filled then stroked" must be considered as A SINGLE path, and the individual glyphs are subpaths...
My understanding is that ONE path can be filled with ONE color (I do not mean gradients of course, I am talking about solid colors, like the red and the blue in my example in B), is this not so? And I can only apply 1 text rendering mode to it, right? How does it make sense then that I can change color and text rendering mode WITHIN the text object, which B tells me, if according to A, I am dealing with a SINGLE path?
And according to C, even each glpyh is to be considered as a SINGLE path as we paint one after, so on top of, the other, which is exactely the concept of PATH. I can not fill ONE PATH "one at a time"...
So, bottomline question, what is the scope of a path in a PDF text object?
Thank you very much for help!
If I understand the spec correctly, you misinterpret the term "the accumulated glyph outlines". It does not refer to all the outline paths of the shown glyphs and their rendering as you assume. Instead it refers only to the outlines that are added to path for clipping if any!
Thus, all the text is filled and/or stroked immediately in the text object according to the state at the time its text showing instruction is evaluated, one glyph at a time. Consequentially, text drawn by different text showing instructions may have different colors and different other characteristics and later glyphs may overlap earlier ones.
Eventually, at the end of a text object all the outlines of the text drawn with text rendering mode 4..7 in the object - if any - are combined in that single path A talks about and used to intersect the previous clipping path.

How to assign a label to go.layout.Shape(type="line"...)?

I produce the following figure.
The figure has a number of add_trace applied to it with go.Scatter as arguments.
A list of 4 go.layout.Shape, type="line", with fixed color attributes, is created and the figure layout is updated with that list: fig.update_layout(..., shapes=...)
The traces have labels assigned to them that we can see to the extreme right.
Is there a way to add labels to assign to the lines as well?
You would like your lines to appear in the legend of the figure (https://plot.ly/python/legend/). However, only traces can appear in the legend, not shapes which are a kind of annotation. What you could do is to create the lines using go.Scatter(..., mode='lines'), and then they would appear in the legend. You just need to give the starting and end points in go.Scatter (see https://plot.ly/python/line-and-scatter/).

How to select following data points in high charts

How to write xpath to select point before orange mark
My xpath to get orange plot is
//*[contains(#class,"highcharts-line-series")]/*[#fill="#FF9700"]
I'm assuming that by "point before orange mark" you mean a data point that occurs before a month marked with an orange dot. If that's what you mean, then you can use this XPath
//path[#fill='#FF9700']/preceding-sibling::path[1]
You haven't posted the rest of the HTML so you may need to add some context to that using something like what you already posted, e.g.
//*[contains(#class,"highcharts-line-series")]/path[#fill='#FF9700']/preceding-sibling::path[1]

dimple.js - modify shape to be unfilled bubble depending on value of 'Channel'

Looking for suggestions on how I can modify the example dimple.js code in link below so the output is a filled/unfilled circle depending on the value of the 'Channel' variable?
http://dimplejs.org/examples_viewer.html?id=bubbles_vertical_grouped
Picture below is an example of the result I am looking to achieve.
result looking for
You can just do:
chart.assignColor("Supermarkets", "transparent", "blue");
Where the third parameter is whatever you want the outline colour to be. If you want thicker borders like your picture you can do that after drawing with:
svg.selectAll("circle").style("stroke-width", 5);
To be a bit more specific you can assign the series to a variable and access them that way:
var series = myChart.addSeries("Channel", dimple.plot.bubble);
myChart.draw();
series.shapes.style("stroke-width", 5);
Or you can set the stroke-width in CSS.

Having trouble interperating ansi color codes

I have spent the weekend working on a personal project and got stuck here. Basically, I need to turn
[0;37m[33m o0==============================~o[0]o~==============================0o
into
o0==============================~o[0]o~==============================0o (only this text would be yellow now)
Using cocoa's regex functionality, I was able to find and capture the "[0;", "37m" and "[33m" individually. the "0;" indicates the server's desire for any previous text styling to be removed and returned to the default which is black background and white text. The "37m" indicates that the server would like for text to be colored white (not sure why this is here, but this is what the server sends). The final "33m" indicates that the server wants the text to be colored yellow. My code correctly finds, strips out, and identifies the requested color changes in the string, but I am having trouble applying these colors to the NSAttributedString I create. The ranges supplied by the regex searches are no longer valid once I strip out the color sequences in the final string, what is an effective way to figure out where the color changes should be applied to the stripped string? In this example, all the color codes are supplied at the beginning, but in other cases, the color codes could be in the middle to cause the string to change color mid-line. NSAttributedString can handle this if I could figure out the proper ranges to assign the requested colors to.
Now that Lion is out I can post the answer. Basically you can use the fancy regex abilities in Lion to figure out what is up. The code to do this (which needs to be refactored, but at least it works) can be found here:
https://github.com/sgoodwin/Turbo-Mud/blob/experiment/Turbo%20Mud/Turbo_MudAppDelegate.m