i need to set arabic numbers on y axis for my asp.net chart, but unfortunately changing the font would not help me. So i tried to change the label text by Code, for all labels I want to change the TEXT of labels, is it possible, is there any way? please see my Chart, i want to change the circled part numbers. thanks
You may use label formatter callback function.
function Format(label, series) {
return "your arabic text";
}
HighCharts is really good for drawing charts.
http://jsfiddle.net/QQk8Z/3/
Related
.setTickStrategy(AxisTickStrategies.Empty);
please refer the pic.
The "grid" is formed by the intersections of all Axis ticks.
If you want to hide the tick labels, but keep the grid, you can do it by hiding tick label style (text) and tick style (small tick between axis and label).
Please refer to the official documentation Numeric Ticks FAQ for tick style syntax.
In this case, VisibleTicks.setTickStyle(emptyLine).setLabelFillStyle(emptyFill) to hide these two parts.
Took me like three days to figure this out. This is set to work on a chart that has a DateTime horizontal axis, but you could tweak a little to work for two number axii. All complaining aside about why this is the way you set things like axis tick visibility:
//turning axis labels off entirely:
function disableTicks(chartObj) {
chartObj.getDefaultAxisX().setTickStrategy(AxisTickStrategies.DateTime,(ticks) =>ticks.setDateOrigin(dateOrigin).setMajorTickStyle((style)=>style.setTickStyle(emptyLine)
.setLabelFillStyle(emptyFill)
).setMinorTickStyle((style)=>style.setTickStyle(emptyLine)
.setLabelFillStyle(emptyFill)
))
chartObj.getDefaultAxisY().setTickStrategy(AxisTickStrategies.Numeric,(ticks) =>ticks.setMajorTickStyle((style)=>style.setTickStyle(emptyLine)
.setLabelFillStyle(emptyFill)
).setMinorTickStyle((style)=>style.setTickStyle(emptyLine)
.setLabelFillStyle(emptyFill)
))
}
You also need to add 'emptyFill' alongside the other declarations (or imports? I've been out of my depth for miles now) at top of your html like so:
<script src="/js/lcjs/lcjs.iife.js"></script>
<script>const { lightningChart,OHLCSeriesTypes, OHLCFigures,
AxisTickStrategies,
LegendBoxBuilders,
Themes, SolidLine, SolidFill, PointShape, ColorHEX, emptyLine, emptyTick,emptyFill } = lcjs</script>
I've been trying to add different colored shapes to the background of plotly.js. However, I also want to be able to label them somewhere so the user knows what color has what meaning. How can I do that?
The first example on here is basically what I've got so far:
https://plot.ly/javascript/shapes/
By default the labels are all a dark gray, I've tried to override them using CSS multiple ways.
How do I change the label's color on render?
Or how do I change the color in the SVG output?
I've looked everywhere and have found similar titles but different meanings. Love how manipulatable this graph is, but the label text color is a must for me.
Thanks in advance.
Finally found the way to do it. Gotta use JS to overwrite the attributes.
After the graph.render() function use these:
$('.x_ticks_d3 text').css('opacity', '1.0');//fix text opacity
$('#x_axis text').css('fill', 'white');//text color
$('.x_ticks_d3 .tick').css('stroke-width', '0px');//text smoothing
$('#x_axis path').css('opacity', '0');//remove line or
$('#x_axis path').css('stroke', 'white');//change line color
This got everything to be white for me, and was able to remove the lines also.
I have an ASP.Net Chart Control of ChartType "Spline", one ChartArea and one Series (it's a sparkline). I was just wondering if anyone out there knew how I could color the area underneath the line - I can't seem to find the property that allows me to do this without coloring the entire background.
Thanks in advance
You need to have a chart with a ChartType of Area to achieve this type of look (similar to google analytics). I have tried it and it does work although i'm not sure how you might get the line to be one particular colour and the area underneath to be a second colour?
http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/981cc4df-2b23-4557-8d89-0b45d553fecc/
I'm having difficulty with Flex charts. I'm working on a complete rewrite of a flex app that has a fair bit of charting involved, and I've been instructed to get the look and feel as close to the previous version as possible (for the initial release).
I can't seem to find the style property which dispays a blue, tabbed sort of effect of the chart axes. As I don't have the rep to post an image, I'll direct you to the adobe live docs 'using line charts' page (sorry, I can only post one link because of the anti spamming mechanism, see link in the edit below) - the effect is present on the vertical axis of the chart at the top of the line charts examples page.
It seems to be some kind of default setting, but I have not been able to pin it down, not even when copying chunks of the old code.
If anyone has any ideas as to how to get hold of this style, or as to what could be removing this style, I'd be extremely grateful.
Thanks for reading.
Edit:
Sorry I will try to clarify:
If you look at the chart at the top of the using line charts page in the Adobe Live docs, the vertical axis has a thick, blue tabbed style, but the horizontal axis does not.
I am trying to gain control over this blue tabbed style - specifically I want to make it appear on the horizontal axis and remove it from the vertical axis of a line chart. However, I cannot find the property which sets this style.
I know it is possible to alter this style, as I have seen examples of charts with the look I need, however there does not appear to be an obvious way to alter it.
I hope this is a bit clearer. Thanks.
The blue bar that comes by default is a stroke. The white divisions within it are minor ticks.
To style it differently, you need four parts:
a chart (e.g. LineChart)
an Axis (e.g. LinearAxis)
an AxisRenderer
a Stroke (e.g. SolidColorStroke)
Then you'll have to connect these parts:
var chart = new LineChart();
var vAxis = new LinearAxis();
var stroke = new SolidColorStroke();
stroke.caps = CapsStyle.NONE;
stroke.weight = 1;
stroke.color = 0x000000;
var axisRenderer = new AxisRenderer();
axisRenderer.axis = vAxis;
axisRenderer.setStyle("axisStroke", stroke);
// Only if you don't want minor ticks to display:
axisRenderer.setStyle("minorTickPlacement", "none");
chart.verticalAxis = vAxis;
chart.verticalAxisRenderers = [axisRenderer];
You'll find more on the topic here: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7c65.html
Its not enough clear for me, what do you want, but if you are looking for styling of charts look this, but if something about axis look this.
Anyway you should explain your goals, so we could help you.