With Apache ECharts, is it possible to change the size of an y-axis, like on the screenshot below?
I was checking the API but couldn't find a way to do this.
Echarts has option Grid (https://echarts.apache.org/en/option.html#grid). It's the same as layer. You can make multiple grids and attach each axis to each grid. Next you should define grid coordinates on canvas and set height (https://echarts.apache.org/examples/en/editor.html?c=dataset-series-layout-by)
Related
I want to display a legend slider besides the map to show the color of the custom raster layer, of the hovered territory. Therefore, I need to get the layer pixel color where the cursor is.
I have found a solution to get the color of a pixel on the map How to get the color of pixels on mapbox, however, if we hover roads or names, another color gets read.
Is there a way to read the layer color on a specific map point?
Are the roads and place labels baked into the raster, or overlaid as vector data sourced layers?
I'm not sure of another method besides querying the canvas, in which case one option would be to hide the vector layers, query, then reshow. But that may not result in the interaction you want?
I'm using wpf and livecharts to wpf app. I want to set minimum distances at but can't find out options.
I'm using 2 kind of charts. one is lineseries chart and the other is column series chart.
Because livechart automatically resize axis X and Y to fit, sometimes the chart is too crowded to see. So I want to set minimum distance between points and columns. panning will solve browsing part.
But problem is, I can't find out setting option. I've checked chart, axis and series options and tried some options. width, minwidth, margin, padding.. but all options didn't work.
My last option is make page and let user change page to see. But if user want to compare another page's value, it is not easy. So I want to avoid it.
Is there any option I'm missing? Please help.
You have to zoom in and out. To do this you have to manually assign an axis to the chart. Axis exposes properties like MinValue and MaxValue. You can use this values to zoom in (e.g. MaxValue < max data x value) or out (e.g. MaxValue > max data x value). MinValue and MaxValue control the visible section (or range). You would need to pan the graph to view other ranges.
To enable panning you have to set the Zoom property on the chart to the axis you wish to pan:
<wpf:CartesianChart Zoom="Xy">
<wpf:CartesianChart.AxisX>
<wpf:Axis MinValue="0" MaxValue="20" />
</wpf:CartesianChart.AxisX >
<wpf:CartesianChart.Series>
<wpf:LineSeries Title="Values" Values="{Binding DataValues}" />
</wpf:CartesianChart.Series>
</wpf:CartesianChart>
I am trying to add one box and one line on x-axis. Please look at below bar chart.
I tried using stripline but I cannot set height for stripline. It goes till 100.
Is there any way I can do this?
Unfortunately, SSRS doesn't provide the functionality you're looking for. A stripline is the closest you can get to that, but like you said, you can't control its height. The only way you could simulate this behavior would be to use a Background Image for your stripline, but that may be more work than it's worth. It would require a lot of manual adjustment to get the image to line up on the chart.
I would add a series to the chart using the Stock chart (under Range). In the Series Properties I would set the High value to the height desired for your line (~52 in your example). Ideally this would come from a dataset value.
Set the Low, Open and Close values to 0.
Try two Stripe Lines. First, create the strip line which represents the vertical value you're after. In my case, I made one that was 50% of the graph height off of the Y-Axis.
Chart Properties:
Height of StripeLine:
Once the stripe line is the correct height for the chart, create a 'mask' stripe line along the X-axis that will cover the portion of the Y-axis line you want hidden.
Chart Propterites:
Width of Stripe Mask:
Using these methods, and some really clever expression writing, you should be able to make the line exactly as high, and as wide as you desire.
In the silverlight toolkit chart control, the legend on the X Axis can show an indeterminate amount of points. E.g. 1,2,3,4,5.
Would it be possible to colour the virtual columns that this creates? I.e. in the space where legend mark 2 is shown, the space above to the top of the control is shaded to a different colour. This will make it interesting as as the chart scales, the legends on the X Axis change with the size available.
This is mainly for a series of type ScatterSeries for my specific example but could extend to a series of LineSeries.
Hope this explains my requirements.
It's not really possible due to the fact that there are no virtual columns created.
The chart is a canvas and the scatter point is just a point positioned on it. Your best bet would be to create your own ColumnSeries type and then style it to look like a ScatterSeries with your desired background colour.
I like to use a grid to position some objects in WPF, because it cares about the position and stuff. In addition, however I also like to be able to draw accross the cells with a Canvas.
I figured out that this can be done by embedding the grid in a canvas. However in order to connect two elements, I need then the absolute position in pixels.. any ideas?
From code you can use the UIElement.TranslatePoint() method.