I want to plot a chart just like this photo.
but I don't know how to create gradient color on the price line according to days until halving.
this is a sample of my row data:
I think that you can use the colorAxis feature/module to achieve the wanted result.
Demo: https://jsfiddle.net/BlackLabel/gsu8xhob/
API: https://api.highcharts.com/highcharts/colorAxis
EDIT:
Oh, my mistake, it seems that the minColor and maxColor values must be a HEX or rgb.
Echarts version : 4.8
I'm using scatter and heatmap series on the same map.
The problem is that on the right border the heatmap are cut until the last point.
How can I display the full heatmap tiles ? what am I missing here ?
Thanks
It is difficult to determine the problem from your picture, it would be easier with the configuration code, but I will try.
Try to add to the chart config the grid option. With grid you will can control padding of the visual chart part against outside space.
https://echarts.apache.org/en/option.html#grid
You need to change left, right, bottom and top options to move the edges.
I am trying to plot a graph like in attached image ,using tableua by getting data from a text file .
It is having 3 fields Datetime ,track ,inuse
We have 43 different track sizes.Need to plot graph for each track with all in a single graph.
Please help me out.
This should be easy to do in tableau. Try putting time on columns, "inuse" on rows and "track" on color.
I do not have your data but am using the data that tableau desktop ships with. Here is what it looks like with the superstore demo data:
To display the labels, also place track on the label shelf. If you then click on the label shelf, you can choose options about where to display them. To mimic your example, label the line ends.
I have a legend with 7 entries, some of which are on one subplot, some are on another, and some are common to both plots. I have managed to get all of these entries into one legend using some help I found online, which was great.
Only problem I have now is that the strings for each entry are quite long, so I ideally need them in 2 columns with the 7th entry centred in the middle at the bottom of the legend. I have found various options to do a multi-columned legend:
Code for a multicolumn legend in Matlab
http://www.mathworks.co.uk/matlabcentral/fileexchange/27389-columnlegend
http://www.mathworks.co.uk/matlabcentral/fileexchange/29248-gridlegend-a-multi-column-format-for-legends
But I can't work out how to combine them with the way I have already worked out how to do the legend.
This is MWE of what I have so far:
xdata=1:1:10;
ydata=0:0.1:0.9;
% Line colours
cm=[32 114 214;145 205 237;0 129 63;247 217 9;255 127 0;184 18 21];
cm=cm/255;
h1=subplot(2,1,1);
l1=line(xdata,ydata,'Color',cm(1,:));
l2=line(xdata,ydata,'Color',cm(2,:));
l3=line(xdata,ydata,'Color',cm(3,:));
l5=line(xdata,ydata,'Color',cm(5,:));
l7=line(xdata,ydata,'Color','k','LineStyle','--');
h2=subplot(2,1,2);
l4=line(xdata,ydata,'Color',cm(4,:));
l6=line(xdata,ydata,'Color',cm(6,:));
line(xdata,ydata,'Color','k','LineStyle','--');
hL=legend(h2,[l1,l2,l3,l4,l5,l6,l7],{'Second/Multi-year La Niña','First/Single-year La Niña','Neutral ENSO years','First/Single-year El Niño','El Niño years','Second/Multi-year El Niño','All Years (1901-2011)'},'Location','SouthOutside','Orientation','horizontal');
set(hL,'Units','centimeters');
Lpos=get(hL,'Position');
Lpos(1)=0;
Lpos(2)=0;
set(hL,'Position',Lpos);
My actual data doesn't overlap so you can see all the lines. Was just easier to have it like that for the example.
Can anyone help me out with the layout I need for the legend? It may well be that I can use one of the 3 options I already found, but I don't really understand what they do well enough to apply it to my situation.
I found another work around with this, which is to create 3 separate legends and then position them where I want. I made a 3rd subplot which has the 'Visible','off' setting and called my three legends using the following code:
lg1=legend(h1,[l1,l2,l3],{'a','b','c'});
lg2=legend(h2,[l4,l5,l6],{'d','e','f'});
lg3=legend(h3,l7,{'g'});
where h1-3 are the subplots, l1-7 are the 7 lines, and a-g are the legend text. I have then rearranged them using get(lg1,'Position'), changing the position vector, and resetting it using set(lg1,'Position',...) (replace ... with the position vector). I turned the box off around the three legends, but plan on putting a box all round the edge so it looks like it is one legend.
Not the prettiest way to do it, but it worked for what I needed to do.
I am using google gwt visualizations chart in gwt application.
I want to show only 2d chart.
but the following problems come.
.
In colums chart
it show scale like 0.0 , 10.4 ,40.5 ....
how to customize the Change scale of the graph. scale should uniform . for example if highest number is more than 400 then it should be 0 , 100, 200 ,300 and if it is 90 then it should be 0 ,20,40,60,80
in piechart
it shows percentage on the slice want to show the actual value.
Thanks In advance
Concerning the column chart, I've never seen that behavior. Maybe it comes from the way you build your data ?
In contrast, about your piechart's question, if you have the last version of gwt visualization (1.1.1), in the PieChart.PieOptions class, there is a method named setPieSliceText(String text).
This method takes 4 possible parameters :
percentage : to display the percentage value
value : to display the quantitive value of the slice
label : to display the name of the slice
none : I think it's obvious ;)
If you don't have the last version and if you can't make the upgrade, just extend the static class PieOptions and implement the native method by yourself.
I hope it helps!