-
Hi Rami, It is me again, the author of the Charts.css.py, a Python chart framework built on top of Charts.css. I find some ambiguity on Charts.css's input data format, and I hope to hear your clarification. The data source of charts.css comes from an html table, which contains rows of cells. The original data source could be:
<table>
<tr>
<td>...</td> <td>...</td> <td>...</td>
</tr>
</table>
<table>
<tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
</table> Q1: Currently, such two flavors of source data happen to be rendered as visually identical bar chart or column chart. Is the identical visual outcome a result of Charts.css internally transpose one input format into another? If so, we better officially document that as a design contract. The current docs does not seem to mention that, although most (if not all) samples use data format No.2. Q2: Such two flavors are rendered as different line chart or area chart. For example, data format No.1 will be treated as a multi-datasets line chart but each dataset contains only one data point, visualized as multiple dots. Data format No.2 will be rendered as a one-dataset line chart which correctly contains one line. It makes sense to have diffferent outcome here, but was there any specific reason that Charts.css chose to interpret data format No.1 & No.2 in the way they currently are, but not the other way around? In other words, do we consider render the following table as a one-line single dataset line chart, because it arguably has better conceptual match with the line chart which also uses horizontal axis to represent days? <table class="line ...">
<tr>
<th>Stock A's price</th><td>value of day 1</td> <td>...day 2</td> <td>...day 3</td>
</tr>
</table> Besides, such a data format probably also better matches another programming language when the html table was generated programatically from an array Alternatively, can Charts.css provide some sort of css class names (e.g. I understand that changing data format is not a trivial decision. That's why I want to have this discussion. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You need to read the "Multiple Datasets" tutorial: https://chartscss.org/components/datasets/ When you have a single With several You need to use the |
Beta Was this translation helpful? Give feedback.
-
Quoting Rami's earlier answer here, otherwise github won't let me to mark it as "chosen answer".
|
Beta Was this translation helpful? Give feedback.
Quoting Rami's earlier answer here, otherwise github won't let me to mark it as "chosen answer".