This is my goal:
a line graph where for x<10, the line is dashed, and for x>=10, it's a solid line.
I know one way to do it is to have two datasets, one with null values for x>=10, and another one with null values for x<10. However, this solution seems too hacky and also at the joint point (x=10), the tooltip will show two lines.
Is there any way to do this in a clean way?
Related
Using an Example of SwiftUICharts, I have used the following, to create a line chart:
**LineView(data: [8,23.5,54.8,32,12,37,7,23,43])**
And it works very nicely:-)
However I want to plot x,y rather than just y values
I have tried
Code Block
LineView(data: [1,2,3,4,5,6,7,8,9], [8,23.5,54.8,32,12,37,7,23,43])
(With and without the comma which separates the 2 bracketed “terms”)
And
LineView(data: [(1,8),(2,23.5),(3,54.8),(4,32),(5,12),(6,37),(7,7),(8,23),(9,43)])
All gave errors
Any idea how I should present the data to obtain the x,y line graph?
TIA,
Phil.
When we want to emphasize one line with different color (my case "green"),
set the rest of the lines as "grey" , like below :
But the Problem the grey one which don't want to be emphasized
covering the main line like the arrangement in Power Point "Front" or "Backward"
How to arrange the order of line to decide which one on the top that won't be hidden by another lines ?
Try the following workaround:
move the measure you want to emphasize to the top;
then save and reopen the pbix file (or simply go to another page and then back)
It should now bring the green line to the front.
Users have requested this capability as an explicit feature, but Microsoft hasn't implemented it yet, as far as I know.
I have a multi-line graph with 2 datasets, where one set has data for every label and the other has some missing entries.
Is there a way to draw the sparse line such that the data points that do exist are connected?
Found the answer here:
https://stackoverflow.com/a/43232364/247722
Add the following to the options object:
options: {
spanGaps: true,
I haven't been able to find documentation for this param, however, so not sure how well supported it is.
Task: I have single text, which is wrapped in two lines and each line should have its own gradient. Separating text is not allowed. It needs to look like this:
I tried using fillGradientType: PIXI.TEXT_GRADIENT.LINEAR_HORIZONTAL, fillGradientStops:[0.0, 0.4, 0.6, 0.7, 0.9], but it resulted in:
How can I apply separate gradient to two lines of same text without dividing it?
I've submitted a PR to PIXI which gives you this functionality via a new gradient style, TEXT_GRADIENT.LINEAR_VERTICAL_NOREPEAT
Check out https://github.com/pixijs/pixi.js/pull/4016 for to track its progress and for examples
I am trying to simulate a piece of hardware, and this hardware has a static ribbon display.
to do this, I'd like to use a TextView. My display has 10 rows, with 25 columns. So I figured that a TextView should be easy enough.
basically, I would like to be able to say "insert/replace string S at row X, starting at column Y". i may need to only update a specific row, or even a single column within a row.
I have not been successful at getting this to work though. the best I have been able to do is to fill the TextView with 10 lines of 25 spaces when i create it, and then use the get_iter_at_line_offset to get the iterator of a line, and then push the new text onto that line.
but this will start appending text to the line, rather than replacing the existing one.
I need both row and column control (i.e. need to be able to set text at a specific (X,Y) coordinate).
I'm assuming this is somehow possible using marks.
Can anyone give me a quick example of how i can do this? Unfortunately, there isn't a whole lot of documentation on this sort of thing.
You'll have to get an iter at a specific line, row X, and then use the iterator's forward_chars() method to move forward Y characters. Then delete the number of characters you are replacing, and finally insert the text you want to insert. You can do it all with iterators, I think - iterators are invalidated when you change the buffer, but when you delete text, one of your iterators is revalidated to point to the place where the text was.
If you're targetting GTK+ 3.x, you should really look into using Cairo. Since you don't actually need a text buffer, it seems like overkill and a bit of a mis-alignment to use the GtkTextView.
Look at the very basic introduction on how to draw with Cairo in GTK+. Then look at the text-rendering Cairo APIs, that should be enough to get you started.