Add marks on click - vega-lite

I would like to add marks with clicks into the Vega view.
For example, in this density plot I would like to set these vertical rules with clicks:
Link to Editor
Is that possible?

It is possible: Triggers can be used to update the data: https://vega.github.io/vega/docs/triggers
In this example, points can be added by clicking into the Vega View:
Link to Editor. Important are the signal addMark that listens on clicks and the trigger that is added to the input data source_0. The signal passes the data as it is stored in the dataset.
Triggers can also be used to drag marks, as in this example that builds on the first:
Link to editor
Applied to the example of my initial question, the final spec looks like:
Link to Editor

Related

Hyperlink box (txtbox) on Access Form won't allow drop

I have a MS Access form that is bound to a query in the database. I added a textbox and added a row source to a Hyperlink datafield in the query. When I open the form, it won't allow me to drop a file into the textbox.
Here's the deal. When I follow this EXACT same process on a new form, it works perfectly. That is, I open a blank form and I bind the form to some new query, let's say qryNewIdeas. Then on the blank form i add a textbox, let's say Text0. Then, when I select Text0, I go to the data tab - row source and choose the dropdown arrow to select the hyperlink field, lets say NewIdeasAddress. I click SAVE and open the form. It works PERFECTLY.
BUT, when I repeat this on an existing form (the one where I need the thing to actually work), it does nothing. It adds and changes the textbox to a hyperlink box (I note this because of the blue underlined word that appears in the box). But it won't allow me to drop files to this location.
I tried commenting out ALL of my VBA code to try to make sure that something wasn't hindering it (say in an OnLoad event) AND I've checked all of the form and control box properties and they seem to be the same in both the existing form and the test form.
I can't determine why it works on one form and not the other; Solution needed.
If you have access to "the data tab - row source ..", you are in design view.
When you later open the form, you are in form view, a completely different animal which specifically prohibits design changes.
It sounds like you will have to rethink your concept.

Sitecore Droplist in Editing Mode

I have set Droplist field in template and set the source. I can see all list items in source path and want to generate the list in Page Editor by element.
I'd like to set different functionality between editor mode and preview mode by using "Sitecore.Context.PageMode.IsPageEditorEditing".
When the page is Editing mode, authors can see the element to choose one of the lists. If it is preview mode, authors will see the value what they chose in the editing mode element.
How can I implement??
I'm using Razor.
Normally in Sitecore you need an EditFrame to handle editing of Droplists in the Page editor. This however is not supported in MVC by default, but there's a great post here on how to get it working:
https://visionsincode.wordpress.com/2015/01/08/how-to-use-editframe-in-sitecore-mvc/
Alternatively you can set a 'custom experience button' to enable editors to change the droplist value when in the Page editor:
To set this up follow these steps:
Change to Core database
Create a new item under /sitecore/content/Applications/WebEdit/Custom Experience Buttons using the template /sitecore/templates/System/WebEdit/Field Editor Button
In this new item, set the value of the 'Fields' field to the name of your templates DropLink field (also set appropriate icon/header/tooltip field values)
Go back to the master database
Select your sublayout/rendering and in the field 'Page Editor Buttons' select your newly created button item.
Once this is setup when you edit the component and click the button editors will be able to change the value for the droplist.

Data label Google spreadsheet Column chart

I have created a column chart in Google spreadsheet, but it is not showing data label explicitly.
I need data value to be shown on top of each bar of column chart. Currently, that is showing only as tool tip, but I require it to be always visible.
I have not used any script just created it directly, please provide some way either by script/direct to implement data labels. only direct / apps script but no java script as I only need to view it on my spreadsheet.
here is link of sheet: https://docs.google.com/spreadsheets/d/1a95DrTeLA52Xmycq3IUlWgfqASQWJQla7xEXx5-KWGE/edit?usp=sharing
You may have found the solution by now but just in case it might be helpful to others, here's my response.
Your sharing of sheet was useful in helping you with your question. Here are the steps to get the values for the data labels on the top of your columns.
Right click on the chart.
Click on Advanced Edit. (This will open a new window named "Chart Editor")
Click on "Customization" tab.
Drag the bar and keep going down until you see "Data Labels" with a drop down below it.
Click on the drop down. (This will open a list of options)
Choose "value" from this list of options.
Click "Update" and you'll see the change in your graph.
Let me know if you have any questions.
I figured out a solution. If you create a pivot table and graph that data, the values will show.

Sending data to script from hyperlink

is there any way I can do something like in my example below but with normal hyperlinks ? I can't use drop down menu.
//edit: I have a web page and a script, on web page now i have drop down menu where user choose some values and submit them, script then do the work.
I just need to sent 3 values to script. (user must choose this values)
Hope its clearly now
this is part of code on my page:
<form action='script/script.py' method='post'>
<select name = 'menu0'>
<option value='x'>X</option>
<option value='y'>Y</option>
//
And also is there any easy way to remember what user set in dropdown menu ?
First, you can't use POST method in hyperlink, if your server code support GET method then you can create separate links for multiple options
x data
y data
....
.....
Other solution: This should also helpful you, as above create multiple links, you can hidden your form and submit form from <a> tag onclick event
With Hyperlink you can use GET method which is more easy to embed in the link like this :
X
Y
So make this work, you will be needing to change your script.py code, that make use of GET function instead of POST.
And easy way to remember what user set in dropdown menu is to store the input you GET via your script to a session variable when script.py gets executed. You can then use that session variable in whole scope of your application i.e. any other python scripts. Refer Session variables for this.

Get selected text within an text item in Oracle forms

There is following scenario:
In Oracle Forms 10, there is a TextItem with text in it. User selects a part of the text using his mouse or keyboard and presses a forms button with trigger behind it.
How do I find the portion of the text selected by the user?
In VisualBasic, there is something like SelectionStart, SelectionEnd, SelectionText. What is the equivalent in forms? Is there any chance to do it with WebUtil?
Thanx
There are 3 built-ins in Oracle form for handling this sort of thing:
COPY_REGION
CUT_REGION
PASTE_REGION
They are all restricted built-ins, so you need to be choosy about which trigger you call them in. Refer to the documentation, it will tell you whether restricted built ins are allowed or not in that particular trigger.
They take no parameters, only operating on the currently selected item (see :system.cursor_item). So, the user is in "textfield1" and they select a certain portion of the data. You need to decide which trigger to issue COPY_REGION in (the easy one is KEY-NEXT-ITEM). For your example, when the user would then press the button to copy, your code would navigate to the intented TextItem and issue the PASTE_REGION built-in.