-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change color one specific line on Map #1614
Comments
You can do that via lineSeries.mapLines.template.setAll({
stroke: am5.color("#15803d"),
strokeWidth: 4,
strokeOpacity: 0.6,
templateField: "lineSettings"
}); Data: lineSeries.pushDataItem({
id: "id1",
geometry: {
type: "LineString",
coordinates: [
[
sourceDataItem.get("longitude") as number,
sourceDataItem.get("latitude") as number,
],
[
targetDataItem.get("longitude") as number,
targetDataItem.get("latitude") as number,
],
],
},
lineSettings: {
stroke: am5.color("#f1f1f1"),
strokeWidth: 4,
strokeOpacity: 0.6,
}
}); |
seem like it doesn't work. And there is a TS issue with key not exist in class |
My bad. Sorry. The parameter for We're adding a second parameter lineSeries.pushDataItem({
id: "id1",
geometry: {
type: "LineString",
coordinates: [
[
sourceDataItem.get("longitude") as number,
sourceDataItem.get("latitude") as number,
],
[
targetDataItem.get("longitude") as number,
targetDataItem.get("latitude") as number,
],
],
},
}, {
lineSettings: {
stroke: am5.color("#f1f1f1"),
strokeWidth: 4,
strokeOpacity: 0.6,
}
}); We will notify you here when the new version is out. Possible later this week. |
Fixed in 5.10.0. [5.10.0] - 2024-07-22Added
Fixed
Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue. |
Question
I want to change color of one line that I want.
Initially, I set line color via template
It works fine. However, I want to change color of one line to another color
I tried to set that via
mapLine
property but the line disappears instead of changing colorThe text was updated successfully, but these errors were encountered: