Change the shape of points in kendo react scatter chart - kendo-react-ui

I need to change to color and shape of points/items in the kendo react scatter chart. The default is circles with different colors but I need to change it to shapes of diamond, square, circle and plus.
Can anyone please provide help in this regard.

<ChartSeriesItem
type="scatter"
data={data}
xField="rainfall"
yField="windSpeed"
markers={{
visible: true,
type: "triangle",
}}
/>
It can be controlled with the Markers properties type and background

Related

React-leaflet Circle component do not set radius

I use this component like it should be used
<Circle center={[30, 70]} fillColor={"blue"} radius={70} />
Problem is that circle look like dot no matter what is zoom level.
I must say that other components like Polygon render just normal as it should be.
Do you know what could be a problem?
The problem was in map CRS attribute.
So Circle and other components were not rendered properly.
You can see how to solve CRS attribute on this link
Set react-leaflet map CRS atribute

KendoUI-Angular2 Chart component responsivity

I have two issues relative to the Chart component:
my x-axis labels are months, but they overlap each other. Is there a way to avoid that ?
If I rotate my device to landscape orientation, the chart does not adapt to the new size. See screenshot. How do I fix that ?
You can use automatic label rotation as in this plunkr:
<kendo-chart>
<kendo-chart-category-axis>
<kendo-chart-category-axis-item [labels]="{ rotation: 'auto' }">
</kendo-chart-category-axis-item>
</kendo-chart-category-axis>
</kendo-chart>
As for the second issue, you can monitor issue #73 for updates.

Automatically fit Bokeh plot to screen?

Is there a simple way to automatically fit a Bokeh plot to the screen used to display your browser? Right now I'm setting the plot width and height manually.
Note: when I say fit I mean that I want the plot to fill 80% of the visible screen.
In more recent bokeh versions, yes you can do this (easily).
plots and layouts now have a sizing_mode property which by default is set to fixed. The other values include scale_width, scale_height, and scale_both.
import bokeh.plotting
import bokeh.layouts
fig1 = bokeh.plotting.figure()
fig1.sizing_mode = 'scale_width'
fig2 = bokeh.plotting.figure()
fig2.sizing_mode = 'scale_width'
column = bokeh.layouts.column([fig1, fig2])
column.sizing_mode = 'scale_width'
As in the example above, your layout will need to have its sizing_mode attribute set appropriately to let its children plots expand.
Using the above example your plot will expand to the size of its container. It's up to you to appropriately size the container (using CSS) to suit your needs.
Note that the width/height property of your figures/plots still matter: they determine the ratio at which the bokeh layout scales.

ImageOverlay and Rectangle Z index issue

I have a function that adds an imageOverlay and a semitransparent Rectangle on top of that image (so as to tint the image, and draw a keyline around it).
activeUserImage = new L.imageOverlay(imageUrl, imageBounds).addTo(map);
activeUserTile = new L.rectangle(imageBounds, {stroke: true, color: "#ffffff", opacity:1, weight: 1, fillColor: "#003572", fillOpacity: 0.7, clickable:true}).addTo(map);
this works great, but then I want to remove the image and rectangle with:
map.removeLayer(activeUserImage);
map.removeLayer(activeUserTile);
This seems to work well...
However when I try and add a second Image & Rectangle (using the same function) the rectangle SVG is being rendered underneath the image, so I don't see the colored overlay.
This seems to be because the element is being left behind from the first creation, and then when the image is being added a second time it appears in front of the SVG.
Q:
Is this a bug? Should the SVG element not be cleared too?
Can I adjust z-index of the image or SVG on creation?
should i be containing to rectangle in a different layer to the images? How?
Many Thanks
OK, so the Leaflet bringToFront() method didn't work, but instead I have used a bit of JQuery to force the same approach.
svgObj = $('.leaflet-overlay-pane svg');
svgObj.css('z-index', 9999);
This works, but still feels like a hack... however if (?) there is a bug in LEaflet, then maybe this will have to do???
Any better ideas?
The bringToFront() function alows you to bring layer to the top.
Search it in the docs.

Graphael pie chart legend overlap

I've been using gRaphaël charts for a few weeks now, and every now and then I get some weird issues. A recurring theme is that the pie chart legend labels all get squish together in the wrong places. Picture > words:
The chart is created as you would expect, in this case:
var r = Raphael(domNode, 300, 120);
this.chart = r.piechart(55, 55, 50, [75, 25],
{
colors: [
"000-#d00-#900",
"000-#3a3-#070"
],
legend: ["Building", "Tertiary Education"],
legendpos: "east"
});
I then do some more basic styling, but turning that off doesn't help. The problem is clearly visible in the <svg> node (the text and circle nodes share overlapping positions), but I don't know where it comes from or why, and it only happens sometimes; other charts work just fine. There's nothing on the forums or issue tracker either, though I just realised I should probably ask there instead/as well.
Using Raphaël 2.1.0 and g.Raphael 0.51.
I have found the following blog post which deals with this exact problem. If the pie chart is rendered in an initially hidden element, gRaphael has problems to compute the positions properly resulting in this stacked legend:
So the solution is to render the facebox partial first, after the
facebox is shown, then you execute the Raphael Javascript. In other
word, make sure you generate the chart when the chart container is
there and not hidden!
I have solved this by moving the create pie chart function from the jQuery document ready directive to the on click event that will make the hidden elements visible.
Try to define your legend as following
{ legend: ["Building", "Tertiary Education"] , legendpos: "east"}
Its the only difference taht I could find between your and my working jsfiddle

Resources