Labeling shape on plotly js - plot

I've been trying to add different colored shapes to the background of plotly.js. However, I also want to be able to label them somewhere so the user knows what color has what meaning. How can I do that?
The first example on here is basically what I've got so far:
https://plot.ly/javascript/shapes/

Related

How to add open box around the X axis label

I am drawing a picture of go annotation result using ggplot2, i want to add three open boxes underneath the X axis label to identify the main classes of go annotation. Is there anyone can help me? The picture just look like that as below.

Can ggplot2 Produce Flowcharts?

I would like to draw a simple flowchart in R. As shown in the example below, I would like to be able to determine:
the shape of the boxes
the color of the boxes
the position of the boxes
the text within the boxes
the direction of the arrows between the boxes
the text beside the boxes
There are several packages, that are able to draw such a flowchart (e.g. DiagrammeR). However, I am wondering if this is possible with ggplot2, since I would like to use the ggplot2 themes etc.

Java change legend chart + get color of graph

I have 2 questions.
I made a program that makes charts but the legend it is not realy clear.
I already enlarged the icons (in css) but I would like to fill them up with the same color like there border.
Now question 2. I would like to set the background of my cells to the same color as the matching line in the graph is there a way I can ask what color a line is in the graph?
My program
list.add(w2+" ("+percent+"%)");
months.keySet().forEach((it) -> {
series.getData().add(newXYChart.Data(it.toString().substring(0, 7), months.get(it)));
});
series.setName(w2);
graph.getData().add(series);
graphs.put(w2, series);
I make a XYChart and save it in a hashmap. The tag I put in the hashmap I put in the lisview on the right.

r googleVis: How to control html tooltips (positioning, border and background)

I have figured out how to create custom html tooltips by using roles via googleVis. I can easily modify the content using html but I cannot understand how I can control the tooltip box itself.
My problem was generated because some of the custom tooltips I created are falling outside my chart area and I tried (unsuccessfully) to find a way to control the tooltip position. Idealy I would like to make them behave in the exact same way default tooltips behave in googleVis (always stay withinin the chart area).
When I later implemented the same concept into a line chart I found that I have another problem as well. The tooltip is falling on the line so I cannot see what is the exact point that refers to the tooltip.
Would it be possible for example to keep the callout style of default googleVis tooltip and change the content with HTML?
Additionally, do you know if there is any way to control more tooltip properties like border and background color?
i was also looking for the same
1) when laying out your data, make sure it has columns alternating between, say, data and tooltips, data and tooltips,... that way it is possible to customize tooltips for multiple columns (it does not work if you just append - à la cbind - a set of tooltips columns to your data frame).
Additionally try this http://rcharts.io/viewer/?6644957#.VHcpEkvrdbg

How to Fill in the Area Underneath an ASP.Net Spline Chart Control with a Color?

I have an ASP.Net Chart Control of ChartType "Spline", one ChartArea and one Series (it's a sparkline). I was just wondering if anyone out there knew how I could color the area underneath the line - I can't seem to find the property that allows me to do this without coloring the entire background.
Thanks in advance
You need to have a chart with a ChartType of Area to achieve this type of look (similar to google analytics). I have tried it and it does work although i'm not sure how you might get the line to be one particular colour and the area underneath to be a second colour?
http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/981cc4df-2b23-4557-8d89-0b45d553fecc/

Resources