Using data line widths in bokeh - plot

Is there a way to provide line width in bokeh in data space, or alternatively can the line width be fixed in a way that zooming does not alter it?
I am trying to draw lines right next to one another without clashes or gaps between them.
Currently, I am using a mapping from line width to coordinate width and change the line widths and line coords in sync to achieve this, but as soon as I zoom the line width is adapted.

Is there a way to provide line width in bokeh in data space
No, but feature requests are welcome!
can the line width be fixed in a way that zooming does not alter it?
Line width is set in screen units - zooming does not alter it by default.
It seems like the problem is that you change your line width in response to the range changes, and zooming does change ranges.

Related

How to make this type of shape in react

I want to create this shape in react. I am able to code some of the parts but the border is creating issues.
Image Link here
What I am able to produce
Yo can use z-index property to achieve it.Set the z-index of vertical line to higher number than horizontal line and make sure both overlap each other at there intersection point.

I have problems setting height for the chart, I want to set the plot height of all charts equally, how to do it?

pls check link. I want to set the plot height of all charts equally, how to do it?
link here: jsfiddle.net/doanvh/vqn24y5w/14/ (type http:// left link)
Image here
You can find the highest value of the height among all charts and based on the found value, modify the rest. I have modified your example a little bit by adding a function (look for the updatePlotHeights function between script tags, HTML tab) that performs a simple calculation that makes all charts' heights equal. Also I have decreased charts' widths in order for you to display them horizontally to compare them.
Example:
http://jsfiddle.net/BlackLabel/qbs6k3Lp/

Unwanted overlapping text in watch glance

In my watch glance I have selected the following layout in IB:
For some unknown reason the two top labels want to overlap...sometimes. Like this:
My understanding is that it shouldn't be possible to overlap labels using watchkit. Any idea of how to solve this problem?
I have often found that when labels are not in a Group container, the layout can be unpredictable. I would recommend placing the two top labels in a Group and then make the first Vertical Position Top and the second Vertical Position Bottom. Also be sure to set both labels to use "size to fit content."

dc.bar-chart margin and axis label size adjustment

I found my yAxis label too big to be shown--it was truncated by the left border.
I tried increasing the left margin, with no success. It seems that the label text is left-aligned. So increasing the margin only gets the label further away from the ticks text.
Please see the attached screenshots. The one with wider gap is margin.left=70. The other one is with margin.left=40. No matter which case, the 'Expenditures' seems to be truncated on the left side.
Is there anywhere in the dc.css that I can change this configuration?
Thank you!!
You can adjust where the axis labels are placed relative to the edge by using the second parameter when you call the .xAxisLabel() and .yAxisLabel() methods. This sets the "padding" (actually the offset from the left/bottom).
coordinateGridMixin.xAxisLabel docs
coordinateGridMixin.yAxisLabel docs
It's confusing that the text size gets set through the stylesheet but the positioning can't be. I'm not sure if there's any way around this, though

Flex3 Linechart points are too close to the edge

I have a Flex3 LineChart component using an CircleItemRenderer and the datapoints are being cut off because they are too close to the edge. Here's what it looks like:
http://img29.imageshack.us/img29/3850/chartx.png
As you can see, the circles on the left and right sides are being cut off.
How can I make the LineSeries area, plus the horizontal labels, narrower so it fits in the chart area?
Thanks!
I had the same issue and was able to resolve it by setting the clipContent attribute in the chart tag to false. I found this solution on Amy's Flex Diary.
You might want to set the maximum and minimum values in your LinearAxis in the horizontalAxis object. Check the API for more information: http://livedocs.adobe.com/flex/3/langref/mx/charts/LinearAxis.html
The Line Chart determines automatically these values to fill all the elements in the screen. You might want to change these values so the graph has some space at the sides.
You can set the padding property on the horizontalAxis and verticalAxis child objects as well...
Adjust the mask on the chart component.
I got this to work by changing the type from LineChart to ColumnChart. I still had all of the same axis definitions including Line Series. The results are the same Line graph, but more centered on the graph instead of touching the edges. None of the other padding or gutters were what I was looking for.
I got d solution.
create creationComplete event in LineChart
edit horizontalAxis's padding you want
e.target.horizontalAxis.padding = 0.2;

Resources