Axis stroke in anystock? - anychart

I am trying to change the axis stroke and axis font color in an anystock chart. I tried using the normal method for anycharts and it didn't work.
Is there a way to change these values?

You are probably looking for these methods:
https://api.anychart.com/7.14.3/anychart.core.stock.Plot#yAxis
https://api.anychart.com/7.14.3/anychart.core.stock.Plot#xAxis
Here is a sample: https://jsfiddle.net/vmgwemws/
chart.plot(0).yAxis().stroke("Red");
chart.plot(0).yAxis().ticks().stroke("Red");
chart.plot(0).yAxis().labels().fontColor("Red");
chart.plot(0).yAxis().labels().fontFamily("Courier");
chart.plot(0).xAxis().labels().fontColor("Red");
chart.plot(0).xAxis().labels().fontFamily("Courier");
chart.plot(0).xAxis().minorLabels().fontColor("Red");
chart.plot(0).xAxis().minorLabels().fontFamily("Courier");
chart.plot(0).xAxis().background("Gray 0.5");

Related

yAxis labels are being cut off in ngEchars (Echarts)

I have user ngEcharts (angularjs plugin of Echarts). When i implement bar chart yaxis labels are cutting off.
can anyone point me on the direction to how to prevent this or increase yAxis label area or decrease chart area?
After Ovilia's link i was able to remove cut off using it's grid property.
It has containLabel property.
Once i set containLabel it to true, i didn't need to set grid size. it worked!

How to change shape of elements in the legend - jFreeChart?

How I can change the shape of elements of legend for jFreeChart without changing the graphs of diagrams ?
I have ready time series diagram. I need to update the existed data markers in legend to the simple line with defined colors.
Start by not adding a LegendTitle to your chart. This is usually a controlled by a parameter to your ChartFactory or your JFreeChart constructor. Both CategoryPlot and XYPlot have a setFixedLegendItems() method, mentioned here, that you can use to add a collection of arbitrary legend items.

How to give gradient color for bar chart and dashed line for background of chart in sencha touch

can anybody tell How to give gradient color for bar chart and dashed line for background of chart in sencha touch
Thanks
Gradients are done using the gradients config parameter to the Ext.chart.Chart object.

Telerik bar chart x-axis with long texts

I'm trying the telerik bar chart in my mvc application. The texts on the x-axis labels can sometimes be very long and then they overlap.
How can i solve this? can i use a tooltip for this? and how to set the tooltip text for each bar?
Thanks in advance.
You can add a tooltip by adding Tooltip(true) like so:
Html.Telerik().Chart()
.Name("chart")
.Theme("vista")
.Series( series => series
.Bar( /*data*/)
.CategoryAxis( axis => axis
.Categories( /*data*/)
.Tooltip(true)
This will display the value of the Series (x-axis) on hover.
I know you can rotate the labels on the category axis by doing something like this:
.CategoryAxis( axis =>
{
axis.Categories( /*data*/ );
axis.Labels(labels => labels.Rotation(45));//this rotates 45 degrees (you can use whatever value you want)
}
but I don't think the Label method is available on the Series. You may consider flipping the Series and the Axis (if that would still make sense for your data). You may also consider formatting (abbreviating) the x-axis labels and adding your own legend.

Silverlight/WPF charting toolkit. Can I change frequency of tick marks on CategoryAxis?

There is Interval property on LinearAxis but none on CategoryAxis. I need to control frequency of tick marks on X axis.
The native logic does so many marks that I cant read even if I stretch the chart across 3 wide monitors!!
A couple of suggestions...
1.) CategoryAxis has a AxisLabelStyle property which you can use to set in a Style with a smaller FontSize, or a more condensed FontFamily
2.) CategoryAxis also has MajorTickMarkStyle which you can use to set the Line Stroke brush or StrokeThickness. Use a StrokeThickness of 0 to hide them.
3.) Maybe you can find a way to get a changethe Width of the AxisLabel's container and make the label text wrap.
Good luck
Jim McCurdy

Resources