I'm trying to change the size of legend marker in C3. In C3 documentation there is nothing about being able to do that, so I'm trying with css.
As far as I can see, legend marker is a <line> tag in svg. So the only thing I can change is stroke properties. If I change stroke-width, I get "higher" marker, but of the same width. Changing stroke-linecap also didn't do the trick.
Is changing marker size possible?
Here is a plunker: http://plnkr.co/edit/yIZ8kFhlWV7v7LY0mXdL
I made a change directly in c3.js (c3.min.js), in function c3_chart_internal_fn.getDefaultConfig().
From
legend_item_tile_width: 10,
legend_item_tile_height: 10,
to
legend_item_tile_width: 16,
legend_item_tile_height: 16,
Related
I was wondering if there is any way I can show labels Horizontally for PieSeries above Pie Graph, as by default it is shown below graph and vertically. I tried to find a way similar to Opposite property of AxisRendererX as given in OppositeProperty explanation, But I failed to show my labels in a Horizontal way above graph! An image of Pie Series that needs to be updated is attached for your reference.
amcharts uses the full area you provide for a chart. If you set the width of your chart to a small value, you have the result you showed. If you resize your chart like I did in the code pen below, the labels are shown horizontally.
To change the legend position you can use the legend.position attribute.
Available options are: "left", "right", "top", "bottom" (default), and "absolute".
https://www.amcharts.com/docs/v4/concepts/legend/#Positioning
In your case you can use the following code to move the legend to the top:
chart.legend = new am4charts.Legend();
chart.legend.position = 'top';
I created a code pen for your example.
I'm pretty new to D3 and NVD3. I'm playing with the line chart example which works great except for one thing: it cuts of the legend text as shown in the screen shot below. In the picture, it says "Mean Size Distributi..." instead for writing out Distribution.
Going through the source for NVD3s legend module, I can't seem to find a setter for the legend width. Any ideas?
chart.legend.maxKeyLength(100);
This will set maximum text length of legend as 100.
I'm trying to display ticks and label together on Y axis but the texts seem to be overlapping between the label and ticks:
Any idea how to move the label more to the left?
Ok, silly of me.
I did not include jqplot CSS file properly. it was pointing to wrong directory.
I have a pie chart which is being generated from a json string. The pie is getting created correctly but what is happening is the tooltip is getting cutoff when the text to be displayed in the tooltip is large. I have tried increasing the width and height of the svg area. But the charts are generated dynamically so i have no way of setting the chart widht and height dynamically depending on the content.
One can adjust the margins margin:[0,100,0,100], to shrink the pie chart so that the tooltips/labels will appear. This has been set to automatically scale the chart in Highcharts 3.0.
http://www.highcharts.com/component/content/article/2-news/53-highcharts-3-0-beta-released
http://github.highcharts.com/v3.0Beta/highcharts.js
http://jsfiddle.net/Zvrt6/1/
Increase Height and width of your chart div or put your code in jsfiddle if possible, so that we can get more idea
This example could be relevant to your situation- http://jsfiddle.net/4ac8b/1/. When you re-size the result pane you will notice the chart size changes accordingly.
You will need to set the size of your container so that the chart is drawn in that area itself. http://jsfiddle.net/4ac8b/. Even when you re-size the result pane the chart size wont change.
Change the diameter of your pie chart to allow additional information
http://www.highcharts.com/ref/#plotOptions-pie--size
I have a line chart, where the chart legend also in forms of line. Is there a way I can change the legend type from colored line to colored circle or square?
Figure like this. http://www.nevron.com/gallery/FullGalleries/chartActiveX/stackline/images/StackLine1.png
I don't think you can use this method to get circles, but if you want to get squares, you can change the chart to a 3-D line chart, then right-click the chart area and select '3-D Rotation'. Change everything in the Rotation section of the menu to as close to 0 as you can get it. This will make your chart show up as a regular line chart while the legend shows little cubes. After you've done that, though, you'll probably have to change the axis settings. In my experience, 3D charts tend to show too many gridlines.