Show swatches in yAxis - highcharts

I have a chart with multiple axes. The same axis can be used for multiple curves.
I would like to draw colored swatches next to the y axes to make it easier to identify which curve belongs to which axis.
I don't find any API setting or sample. Is it possible? If yes, how?

Related

For a TChart Series, how do you keep the Gradient within the X-Y Axis?

I am working on creating a risk matrix where the gradient needs to represent risk. I have used the TChart editor to set colors (green, yellow, red) and direction ("Diagonal Up") for the gradient color. It all looks good except that the gradient goes to the edge of the TChart Panel rather than being cropped at the X, and Y axis. This makes the most intense colors outside of the data.
Is there a way to make the gradient stay within X & Y?
Thanks.
Sample Showing gradient outside of grid

highcharts gradient line (adding a third dimension to a 2d chart)

Do you think I can achieve this in highcharts?
I have dataset with 3 variables: X,Y and Date. I need to plot on a X Y chart the variables X and Y, but also I would like to present the date as gradient on the line. For example, if the series has a green color assigned, the oldest point in the series would be set to a light green and the most recent a dark green.
Thanks.
Leandro

Multiple colors in highchart's Contour graph

I have a requirement in my project where i need to create contour chart using High charts,I have successfully created the chart with the data but now i need to define the legends color as per my data values,as of now the color combination is taken care by the high charts implicitly but i want to use specific color for a specific value.
Basically in my chart i am representing the variation(Percentage difference) in prices b/n two days for two categories so lets say if the the price shoots up the color will be red and if there is price fall the color will be blue,but in order to show the smooth transition between the prices i am using different shades for blue and red and want to associate these color based on their values.
is there is any way where i can do the above customization in code so that i can get the chart like this
Please guide
Can I add multiple colors in Contour ?
Just guide me for the same.
If yes what I have to use ?
I am uploading two images of my graph, both representing same data.
1 is of Heatmap and 2nd is of Contour.
Heatmap
Heatmap
and
Contour
Contour
Heatmap is representing the colors as I coded, but the moment I convert Heatmap to Contour, the colors are not setting properly.
Please guide me can I convert Heatmap to Contour in terms of colors exactly same ?

put axis index on OpenCV histogram

I want to draw histogram of an image in OpenCV. I use the demo code but there is no index number on x axis nor y axis.
Then I use cvPutText to put some numbers on. Again, cvPutText doesn't support put text in different orientation (just horizon). I want the text to be put vertically
Is there any way around this?

How do I transform between datetimes and chart coordinates in Highcharts Renderer?

I have a Highcharts scatter plot with a datetime x axis. The x values are all in the past. The y coordinates are positive integers, typically in the range 100..10k. I want to draw lines from the imaginary point (tomorrow, 0) back to some of the data points.
The Renderer's path command looks to take absolute coordinates in chart space. How do I transform the point (tomorrow,0) into those absolute coordinates?
Also, assume the data was from 1995..2005. The default auto-scaling of Highcharts would make tomorrow be off the chart to the right. What will happen when drawing the path? Will the chart remain the same scale and the line be clipped at the right-hand edge? (That would be OK). Would the chart be redrawn with a new scale so that the x axis covered the whole span from 1995 to tomorrow? Something else?
Thanks in advance...
Found it. There is a translate() function to do the conversion. See the Highcharts support forum thread for info on the function.
Use Axis.toPixels() and Axis.toValue()

Resources