How to exclude certain Series while saving the graph as Image in echarts - echarts

I can save the image or get DataURL of my echarts by using getDataURL.
I can exclude certain components by setting them in excludeComponents string array.
I have many series in my charts.
I can exclude toolbox, legend, title but I don't know how to exclude certain Series (by using series id or index?).
Is there a way to exclude certain series?

Related

Foundry-Workshop - Charts with multiple layers

I would like to know what are the settings capabilities on workshop charts when implementing multiple layers.
Here is an example of a chart with 2 layers (3 objects):
Among the global settings options, I would like to know:
how to have only one legend per group, instead of one per layer?
how to manage colors? Is it possible to change default?
is there any way to display dotted lines for example?
Thanks in advance
how to have only one legend per group, instead of one per layer?
Currently all the legend "flattens" all the series across all the Plot Layers and there isn't any way to change the grouping. If you really wanted to, you could use a couple metric widgets in List or Tag mode and build your own legend alongside the chart, assuming you'd made overrides for all the potential series and series segments (see below).
how to manage colors? Is it possible to change default?
Yes, you can change the color for each series on the chart. If the series has no "Segement By" config, then you can choose the color directly. If you choose to segment by some other property, then you need to add a Segment Display Override for each segment value that you want to change.
is there any way to display dotted lines for example?
You can change the style from solid to dashed in the same place that you can change the color

Line graph using Tableau

I am trying to plot a graph like in attached image ,using tableua by getting data from a text file .
It is having 3 fields Datetime ,track ,inuse
We have 43 different track sizes.Need to plot graph for each track with all in a single graph.
Please help me out.
This should be easy to do in tableau. Try putting time on columns, "inuse" on rows and "track" on color.
I do not have your data but am using the data that tableau desktop ships with. Here is what it looks like with the superstore demo data:
To display the labels, also place track on the label shelf. If you then click on the label shelf, you can choose options about where to display them. To mimic your example, label the line ends.

GANTT Chart with Shapes

I'm trying to create something like a GANTT Chart where I would have start dates and end dates designated by a shape like a diamond and then the period of time in between connecting the start and end date shown as a line connecting the shapes. Does anyone have any tips on how to do that in tableau?
For data I have an identifier column, an event column, a date column, a start date column, and an end date column.
To make a basic Ghantt chart in Tableau, put the start date on the column shelf, convert it to continuous exact date. Put the identifier on the row shelf and change the mark type to Ghantt. This should get a short bar at the start date of each task, with a row per task (assuming the ids are unique per task).
Now you need to specify how long the bars should be by putting a field showing the number of days for each task on the size shelf. You can create a calculated field to compute those durations as datediff('day', contract_start, contract_end). Place that on the size shelf and you should be off to a decent start.
You can add more info to the tool tips and use color to show contract type or something else. add some reference lines by right clicking on the axis. You will need some tweaks in the calculated field to deal with things like null (unknown) end dates, maybe recurring tasks ...
If you want a few milestone markers, you can use reference lines or point annotations to add them by hand easily.
Or if you want to include milestones as shapes with your data, you can use a dual axis chart.
Here is an example showing how to combine shapes and bars into one char. The details vary slightly depending on how your data is organized, but if you examine how the data for this workbook is organized, how the data connection joins the tabs, and how the workbook displays the data, you should be able to adapt the approach to your own data. Just realize sometimes it is easier to revise the way your data is shaped to make the analysis simpler.
Also, you might want to consider if you need both planned and actual dates.
See also
Gantt over time with summed bar

How to modify Chart legends in Excel 2013

I am trying to create a chart in Excel 2013 from a subset of data within a larger report. All the examples show using the headers to create the legend on the chart, but since I am just using select rows in the report, I can't utilize the headers. Is there any way to directly modify the legend, or even indirectly. I am open to any suggestions. Basically, I have a row with multiple data points that I want to graph. The title works out okay, but the legend just indicates 1 and 7 (the columns I am charting). Since I don't want to graph the entire report, I don't seem to be able to capture the column headings.
The words in the legend are sourced from the series name. You can point the series name to any cell in the spreadsheet. In the screenshot, the original series names were one, two and three. In the series definition, they got re-pointed to the cells that say blue, red and green.
Depending on your data and requirements this can be made dynamic.

How to dynamically change line style in JavaFX 2.0 line chart?

In our JavaFX project we need a line chart. I can easy stylize the whole chart and series using CSS, but content of our chart can change dynamically:
number of series and their displaying order depends on user actions and his data. Each series represents a concrete data category and the each category has its own style, eg. category A is shown as a dotted line and category B is shown as a dashed line. The chart can contain 0 or more series for each category,
style of series depends on data values too, eg. series line over the average is red, and below is blue.
How to do it in JavaFX?
number of series and their displaying order depends on user actions and his data.
The number of series displayed and the display order can be modified by changing the ObservableList of series which you passed to the chart's setData() call. As the chart listens for changes to the list, as the backing list changes, the chart is automatically updated to reflect the changes.
each category has its own style, eg. category A is shown as a dotted line and category B is shown as a dashed line.
This can done by determining which series in the chart is in which category, looking up all nodes related to the series via the node lookupAll(cssStyleSelector) function and applying a new custom style to the series which matches the style for the category. Dotted and dashed lines can be styled via css by setting the -fx-stroke-dash-array css property. Alternately, rather than a lookup you can dynamically change the css styleclass assigned to nodes via modifying the ObservableList returned from getStyleClass().
style of series depends on data values too, eg. series line over the average is red, and below is blue.
This is similar to how the dotted and dashed lines are displayed, but instead the color of the lines are modifed by the -fx-stroke css property and the modification depends on the average values calculated for the series.
To demonstrate the above points, I created a sample solution for this question here: https://gist.github.com/2129306
I did it like this, thought it was pretty handy. Note: This apparently works on LineCharts but not ScatterCharts.
Series<Number, Number> series = new Series<>();
...
series.nodeProperty().get().setStyle("-fx-stroke-width: 1px;");