Highcharts: How to resize chart from external JS? - dynamic

I have two charts on a page, their codes stored in different files. What Im trying to achieve is: When I click on first chart, the second should change its size (lower height and width). Function that should do this is in yet another file (but I think it´s not the condition)... I tried to change the width of containing div, but it only cuts the chart. Then I tried to change the width of that div and then to load that chart again...no result.... Is it even possible to do this?

Use setSize() function.
For example:
chart.setSize(newWidth, newHeight);

Related

Stop overlapping elements from pushing text down

I'm trying to build a section with text overlapping an image using relative positioning. However the text within the text container is forcing below the image instead of overlapping it. I've tried z-index, float, replacing image with div box, but nothing seems to get the text to clear the image (the text wrapper overlaps fine). Anyone have any idea how to get the text elements to overlap the image as well instead of breaking around it?
https://mjedev.wpengine.com/capabilities/engineering-services/
user: demo
pw: cead2f68da79

Determine the size of chart bar in flutter

I am trying to create a chart that displays the data that came from the api that is supposed to be like this image
as for the date and the size of the columns, no matter how many data are coming
I have two problems:
1- I don't know Make the widget flexible so that the column always appears the same size
2- I don’t know. Make the date the same as what is needed. It is displayed in the same form in the API
how can I fix it
For making a widget flexible and appear the same size you can use BoxConstraints by adding Container or SizedBox as parent widget and defining height and width.

vega-lite: how to dynamically resize single plots

I'm looking for a way to set the size on a chart either dynamically or at creation of a single vega-lite chart. So far, I have tried setting width and height on spec.config.cell used for trellis charts which sets the height only, also calling the width() and height() methods on the view object, e.g.
view.height(200).width(200).render()
best I can do is get the canvas to resize and crop the chart, but the chart does not redraw to the specified size. I'm looking for it to work with padding:'strict' to specify the overall size, not just the size of the data rect.
Aside from manually setting the bandWidth for ordinals it seems the feature isn't implemented just yet:
https://github.com/vega/vega-lite/issues/1356#issuecomment-231825910

Modify Z-index on Series object in Excel 2010

I am using excel 2010.
I have a chart diagram on which i put a rectangle to surround the highest column bar.
In order to make things more readable, i would like to place this rectangle on the chart but NOT in front of the lines/bars/etc...It has to be behind them.
Shape objects (like my rectangle) have a ZIndex property than can be modified in order to achieve that. Thing is, it seems impossible to put that behind the elements of my chart, nor the chart itself.
The main reason is because Chart objects and Series objects (which are the columns inside my chart) doesn't have a Z-Index property.
Is there a way which could allow me to achieve this ? Other than modifying ZIndex property ?
You can move the Chart in front of the Shape, or the Shape in front of the Chart. But what you are looking to do is to stuff the Shape behind some components of the chart, but still in front of the chart background.
That, as far as I know cannot be done.
But you can simulate the effect by making the Chart's background and the Plot area transparent (no fill, instead of the default White fill) by simply right clicking and adjusting properties.
Also, you can highlight both the chart and the shape (Ctrl-Multiple Select) and lock the two together so your Shape will look like it's a part of the chart and is behind the components.
Of course, the shape will be behind the whole chart itself (by setting the appropriate Z-value, which you may find by simply clicking on Record Macro and running the formatting once to get sample code) but since the chart's background is transparent and so is the plot area's it'll look as if the rectangle's behind the lines and all.

Relative maximum width in XUL

I'm working on a Firefox extension, and am having problems getting relative constraints on the width of elements in the sidebar. For example, I want a description element in the sidebar that will always be as big as the sidebar when the sidebar is resized, and has text wrapping accordingly.
If I put a description in a box with a fixed maximum width, it will wrap correctly, but I can't get relative widths to work correctly using css. If is set the max-width to be 100% in css, it seems to just ignore it and the text will be on a single line and will overflow the sidebar. Any suggestions on how to put relative width constraints on a box in XUL so that text will wrap correctly?
It sounds like setting maximum width isn't what you really want. Have a look at https://developer.mozilla.org/en/XUL_Tutorial/The_Box_Model, setting flex attribute would be the right approach to make an element fill all the available space (typically flex="1"). The corresponding CSS property would be -moz-box-flex: 1.