-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
i am using zk charts and i want to set a rotation angle for the symbol (triangle) of a point. How can i do this?
Best regards, Dresse
Hey Dresse,
I don't think there is a built-in API. This said, you can style it directly.
Add a css class to the serie you need to rotate to be able to target the markers for a specific serie:
//find your serie in your chart, then add a css class to the serie using plotoptions
chart.getSeries(3).getPlotOptions().addExtraAttr("className",new JavaScriptValue("'myexampleclass'"));
Then just use the css transformations (to test with relevant browsers. This works well in chrome on my side).
<style>
.myexampleclass .highcharts-point {
transform: rotate(90deg);
transform-origin: center;
}
</style>
If that doesn't work for you, you can also have a look at the API for series Symbols: https://api.highcharts.com/highcharts/plotOptions.series.marker.symbol but that's for a complete replacement of the original marker by something else.
Have a look and tell me what you think ;)
Asked: 2017-11-30 21:45:57 +0800
Seen: 17 times
Last updated: Dec 01 '17